Merge pull request #205 from unsplash/add-special-char #22
Workflow file for this run
This file contains 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: Publish | |
on: | |
push: | |
tags: | |
- v*.*.* | |
jobs: | |
publish: | |
name: Publish binaries | |
strategy: | |
matrix: | |
os: | |
[ | |
{ name: "linux", runner: "ubuntu-latest" }, | |
{ name: "macos", runner: "macos-latest" }, | |
] | |
runs-on: ${{ matrix.os.runner }} | |
steps: | |
- uses: actions/checkout@v3 | |
# Using Nix causes dynamic linking issues on macOS. It's easier to | |
# workaround on Linux with patchelf at least. (Yes, building statically | |
# would be substantially better.) | |
- uses: haskell/actions/setup@v2 | |
with: | |
ghc-version: 9.4.6 | |
- run: cabal freeze | |
- uses: ./.github/actions/cabal-cache | |
- name: Build | |
run: | | |
# Unlike `cabal build`, `cabal install` appears to build in a | |
# different working directory, which means our githash dependency | |
# can't access Git at compile time. Related: | |
# https://github.com/snoyberg/githash/issues/9 | |
cabal build | |
mv $(find ./dist-newstyle/ -name intlc -type f) dist-newstyle/intlc-${{ github.ref_name }}-${{ matrix.os.name }}-x86_64 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist-newstyle/intlc-${{ github.ref_name }}-${{ matrix.os.name }}-x86_64 |