diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b6bc948 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }} + diff --git a/install b/install index b711ed8..d3476af 100755 --- a/install +++ b/install @@ -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.