Skip to content

Commit 86f14da

Browse files
authored
feat(ci): Add release-please action to handle releases (#13)
feat: pull latest stable release of noirup rather than from main
1 parent 0115f9c commit 86f14da

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release-please:
10+
name: Create Release
11+
outputs:
12+
release-pr: ${{ steps.release.outputs.pr }}
13+
tag-name: ${{ steps.release.outputs.tag_name }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Run release-please
17+
id: release
18+
uses: google-github-actions/release-please-action@v3
19+
with:
20+
token: ${{ secrets.NOIRUP_REPO_TOKEN }}
21+
release-type: simple
22+
package-name: noirup
23+
bump-minor-pre-major: true
24+
bump-patch-for-minor-pre-major: true
25+
pull-request-title-pattern: "chore(noirup): Release ${version}"
26+
27+
upload-files:
28+
name: Upload files to release
29+
needs: [release-please]
30+
if: ${{ needs.release-please.outputs.tag-name }}
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Upload files to release
34+
uses: svenstaro/upload-release-action@v2
35+
with:
36+
repo_token: ${{ secrets.NOIRUP_REPO_TOKEN }}
37+
file: ./{noirup,install-windows}
38+
file_glob: true
39+
overwrite: true
40+
tag: ${{ needs.release-please.outputs.tag-name }}
41+

install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ echo Installing noirup...
66
NARGO_HOME=${NARGO_HOME-"$HOME/.nargo"}
77
NARGO_BIN_DIR="$NARGO_HOME/bin"
88

9-
BIN_URL="https://raw.githubusercontent.com/noir-lang/noirup/main/noirup"
9+
BIN_URL="https://github.com/noir-lang/noirup/releases/latest/download/noirup"
1010
BIN_PATH="$NARGO_BIN_DIR/noirup"
1111

1212
# Create the .nargo bin directory and noirup binary if it doesn't exist.

0 commit comments

Comments
 (0)