Skip to content

Commit

Permalink
Fix bugs in Haskell CI (#83)
Browse files Browse the repository at this point in the history
* Fix bugs in Haskell CI: no artifact upload and publish not running

* Capture tarball path, not dir path
  • Loading branch information
domMayhew committed Mar 14, 2024
1 parent e3e77e6 commit 262de23
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/actions/publish-haskell/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,17 @@ runs:
run: |
stack test
stack sdist
echo "SDIST-LOCATION=$(pwd)/dist-newstyle/sdist/utxorpc-${{ env.version }}.tar.gz" >> "$GITHUB_OUTPUT"
TARBALL=$(stack sdist 2>&1 |
sed -nE 's|^(.*utxorpc-.*\.tar\.gz).*$|\1|p')
echo "TARBALL=$TARBALL" >> "$GITHUB_OUTPUT"
- name: Upload GitHub artifacts
if: inputs.mode == 'release'
uses: actions/upload-artifact@v4
env:
version: ${{ steps.package-version.outputs.VERSION }}
location: ${{ steps.build.outputs.SDIST-LOCATION }}
location: ${{ steps.build.outputs.TARBALL }}
with:
name: haskell-${{ env.version }}
path: ${{ env.location }}
Expand All @@ -84,7 +87,7 @@ runs:
stack upload --candidate --test-tarball .
- name: Upload to Hackage
if: inputs.mode == 'release' && startsWith(github.ref, 'ref/tags/v')
if: inputs.mode == 'release' && startsWith(github.ref, 'refs/tags/v')
shell: bash
working-directory: codegen/haskell
run: |
Expand Down

0 comments on commit 262de23

Please sign in to comment.