Skip to content

Commit

Permalink
feat(ci): Add release-please action to handle releases (#13)
Browse files Browse the repository at this point in the history
feat: pull latest stable release of noirup rather than from main
  • Loading branch information
TomAFrench authored Mar 21, 2023
1 parent 0115f9c commit 86f14da
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
branches:
- main

jobs:
release-please:
name: Create Release
outputs:
release-pr: ${{ steps.release.outputs.pr }}
tag-name: ${{ steps.release.outputs.tag_name }}
runs-on: ubuntu-latest
steps:
- name: Run release-please
id: release
uses: google-github-actions/release-please-action@v3
with:
token: ${{ secrets.NOIRUP_REPO_TOKEN }}
release-type: simple
package-name: noirup
bump-minor-pre-major: true
bump-patch-for-minor-pre-major: true
pull-request-title-pattern: "chore(noirup): Release ${version}"

upload-files:
name: Upload files to release
needs: [release-please]
if: ${{ needs.release-please.outputs.tag-name }}
runs-on: ubuntu-latest
steps:
- name: Upload files to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.NOIRUP_REPO_TOKEN }}
file: ./{noirup,install-windows}
file_glob: true
overwrite: true
tag: ${{ needs.release-please.outputs.tag-name }}

2 changes: 1 addition & 1 deletion install
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo Installing noirup...
NARGO_HOME=${NARGO_HOME-"$HOME/.nargo"}
NARGO_BIN_DIR="$NARGO_HOME/bin"

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

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

0 comments on commit 86f14da

Please sign in to comment.