Skip to content

Commit

Permalink
Update build-and-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
APoniatowski authored Jul 20, 2024
1 parent 2cd8f76 commit a105a2e
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,22 @@ jobs:
go build -o zehd ./...
cd ../../
- name: Set Version and Changelog
- name: Set Version
id: vars
run: |
echo "VERSION=$(cat ./VERSION)" >> $GITHUB_OUTPUT
echo "changelog<<EOF" >> $GITHUB_OUTPUT
cat ./CHANGELOG >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
run: echo "version=$(cat ./VERSION)" >> $GITHUB_OUTPUT

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: zehd
path: cmd/zehd/zehd

- name: Upload Changelog
uses: actions/upload-artifact@v3
with:
name: changelog
path: CHANGELOG

release:
needs: build
runs-on: ubuntu-latest
Expand All @@ -48,6 +50,11 @@ jobs:
with:
name: zehd

- name: Download Changelog
uses: actions/download-artifact@v3
with:
name: changelog

- name: Create Release
uses: ncipollo/release-action@v1
env:
Expand All @@ -56,5 +63,5 @@ jobs:
artifacts: 'zehd'
tag: v${{ needs.build.outputs.version }}
name: ZEHD v${{ needs.build.outputs.version }}
body: ${{ needs.build.outputs.changelog }}
bodyFile: CHANGELOG
allowUpdates: true

0 comments on commit a105a2e

Please sign in to comment.