Release #71
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: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '30 5 * * 1' # At 05:30 AM, only on Monday | |
| push: | |
| tags: | |
| - 'release/[0-9]+.[0-9]+.[0-9]+' | |
| jobs: | |
| releaseBuilds: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: "macos-15-intel" | |
| suffix: "x86_64-macos" | |
| # macos-15 is arm64 | |
| - os: "macos-15" | |
| suffix: "arm64-macos" | |
| - os: "ubuntu-latest" | |
| suffix: "x86_64-linux" | |
| name: Build binary on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Nix | |
| uses: nixbuild/nix-quick-install-action@v30 | |
| - name: build hevm | |
| run: | | |
| nix build .#redistributable --out-link hevm | |
| cp ./hevm/bin/hevm ./hevm-${{ matrix.suffix }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: hevm-${{ matrix.suffix }} | |
| path: ./hevm-${{ matrix.suffix }} | |
| Upload: | |
| needs: [releaseBuilds] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Nix | |
| uses: nixbuild/nix-quick-install-action@v30 | |
| - name: download binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| merge-multiple: true | |
| - name: create github release & upload binaries | |
| uses: softprops/action-gh-release@v2 | |
| # scheduled/manual runs should not create a release | |
| if: github.event_name == 'push' | |
| with: | |
| fail_on_unmatched_files: true | |
| files: | | |
| ./hevm-x86_64-linux | |
| ./hevm-x86_64-macos | |
| ./hevm-arm64-macos | |
| - name: prepare hackage artifacts | |
| run: | | |
| # cabal complains if we don't do this... | |
| nix develop --command bash -c "cabal update" | |
| nix develop --command bash -c "cabal sdist --builddir='$RUNNER_TEMP/packages'" | |
| nix develop --command bash -c "cabal haddock lib:hevm --builddir='$RUNNER_TEMP/docs' --haddock-for-hackage --haddock-option=--hyperlinked-source" | |
| - name: publish to hackage | |
| uses: haskell-actions/hackage-publish@v1 | |
| # scheduled/manual runs should not publish anything | |
| if: github.event_name == 'push' | |
| with: | |
| hackageToken: ${{ secrets.HACKAGE_AUTH_TOKEN }} | |
| packagesPath: ${{ runner.temp }}/packages/sdist | |
| docsPath: ${{ runner.temp }}/docs | |
| publish: true | |