chore(main): Release 0.34.0 (#258) #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| release-please: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| steps: | |
| - uses: google-github-actions/release-please-action@v3.7.10 | |
| id: release | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| release-type: ocaml | |
| package-name: binaryen.ml | |
| pull-request-title-pattern: "chore${scope}: Release${component} ${version}" | |
| bump-minor-pre-major: true | |
| bump-patch-for-minor-pre-major: true | |
| add-archive: | |
| needs: [release-please] | |
| if: ${{ needs.release-please.outputs.release_created }} | |
| name: Add archive to release | |
| runs-on: macos-latest | |
| outputs: | |
| browser_download_url: ${{ steps.upload.outputs.browser_download_url }} | |
| notes: ${{ steps.upload.outputs.notes }} | |
| steps: | |
| - name: Install git-archive-all | |
| run: | | |
| brew install git-archive-all | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: "recursive" | |
| - name: Build archive | |
| run: | | |
| git-archive-all --force-submodules binaryen-archive.tar.gz | |
| - name: Upload Release Asset | |
| id: upload | |
| uses: grain-lang/upload-release-action@v3.0.2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ./binaryen-archive.tar.gz | |
| asset_name: binaryen-archive-${{ needs.release-please.outputs.tag_name }}.tar.gz | |
| tag: ${{ needs.release-please.outputs.tag_name }} | |
| opam-release: | |
| needs: [release-please, add-archive] | |
| name: Publish to opam registry | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup bot user | |
| run: | | |
| git config --global user.email "bot@grain-lang.org" | |
| git config --global user.name "Grain Bot" | |
| - name: Generate CHANGES file | |
| env: | |
| CHANGES: ${{ needs.add-archive.outputs.notes }} | |
| run: | | |
| echo -n "$CHANGES" > CHANGES.md | |
| - name: Setup OCaml | |
| uses: ocaml/setup-ocaml@c2e6bb92370612b89f302c3aaefa1da45ee2d702 # v3.2.15 | |
| with: | |
| ocaml-compiler: 5.2.0 | |
| - name: Install publish utils | |
| run: | | |
| opam install opam-publish=2.7.0 | |
| - name: Publish to opam | |
| env: | |
| OPAM_PUBLISH_GH_TOKEN: ${{ secrets.OPAM_RELEASE }} | |
| run: | | |
| opam publish --no-confirmation --no-browser --msg-file=CHANGES.md ${{ needs.add-archive.outputs.browser_download_url }} | |
| npm-release: | |
| needs: [add-archive] | |
| name: Publish to npm registry | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 | |
| with: | |
| node-version: "22" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Publish to npm | |
| run: npm publish ${{ needs.add-archive.outputs.browser_download_url }} | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE }} |