Skip to content

Commit

Permalink
fix: Fixed go releaser setup to fix release notes (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
slewis74 authored Dec 23, 2022
1 parent 5dfe359 commit 7d5f720
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/go-releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,17 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: "!contains(needs.goreleaser.outputs.version, '-')" # don't generate release notes for SNAPSHOT builds because there won't be a github release to get them from
run: |
echo "name=release-notes::$(jq --raw-output '.release.body' ${{ github.event_path }} | sed 's#\r# #g')" >> $GITHUB_OUTPUT
echo "::debug::${{github.event_name}}"
OUTPUT_FILE="release_notes.txt"
gh release view "${{ needs.goreleaser.outputs.tag_name }}" --jq '.body' --json 'body' | sed 's#\r# #g' > $OUTPUT_FILE
echo "::set-output name=release-note-file::$OUTPUT_FILE"
- uses: OctopusDeploy/create-release-action@v3
if: "!contains(needs.goreleaser.outputs.version, '-')"
with:
project: 'cli'
# don't specify a default package version; let all the 'tool' packages pick latest and just specify our own version
packages: octopus-cli:${{ needs.goreleaser.outputs.version }}
release_notes: ${{ steps.fetch-release-notes.outputs.release-notes || ''}}
release_notes_file: ${{ steps.fetch-release-notes.outputs.release-note-file || ''}}
git_ref: ${{ github.event.repository.default_branch }}
git_commit: ${{ github.event.after || github.event.pull_request.head.sha }}

0 comments on commit 7d5f720

Please sign in to comment.