Skip to content

Commit

Permalink
Fix CI for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Kleidukos committed Sep 6, 2024
1 parent eb453a5 commit 3859373
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
pattern: artifact-*
pattern: get-tested-*
merge-multiple: true
path: ./out

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
outputs:
version: ${{ steps.version.output.version }}
steps:

- name: "Install tools"
Expand Down Expand Up @@ -76,10 +78,15 @@ jobs:
path: ${{ env.REPORT_NAME }}

- name: Install
id: version
run: |
bin=$(cabal -v0 --project-file=cabal.release.project list-bin get-tested)
mkdir distribution
cp ${bin} distribution/get-tested
- id: version
run: |
version=$(./distribution/get-tested --version)
echo "version=${version}" >> "$GITHUB_OUTPUT"
- name: Post-process executables
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down Expand Up @@ -221,13 +228,15 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
pattern: artifact-*
pattern: get-tested-*
merge-multiple: true
path: ./out

- name: Pre-release
- name: Release
uses: softprops/action-gh-release@v2
with:
prerelease: true
files: ./out/*
tag_name: get-tested-head
tag_name: get-tested-${{ env.version }}
env:
version: ${{ needs.build.output.version }}

0 comments on commit 3859373

Please sign in to comment.