Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,17 @@ jobs:
"${GITHUB_WORKSPACE}/.github/draft_release_notes.sh"
- name: Draft release
id: draft_release
uses: actions/create-release@v1
with:
release_name: ${{ inputs.release }}
tag_name: ${{ inputs.release }}
draft: true
prerelease: true
body_path: Changes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

nit: I’d suggest renaming this for consistency.

run: |
if [ ! -f Changes.md ]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this may not be needed. According to the GitHub Actions docs, steps are executed in order and are dependent on each other.

Additionally, continue-on-error is set to false by default, which means a failed step will stop the job.

Therefore, it’s safe to assume that if we reach this step, the previous steps have succeeded and the Changes.md file already exists.

echo "ERROR: Changes.md was not generated!"
exit 1
fi

gh release create "${{ inputs.release }}" \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this command is missing the --target flag. For reference, see the command in the build repo: https://github.com/shipwright-io/build/blob/e0c4b9d4ce96a71f31e1d9389a2e885d6cf2e761/.github/workflows/release.yaml#L66

--repo "${{ github.repository }}" \
--title "${{ inputs.release }}" \
--notes-file Changes.md \
--draft \
--prerelease
Comment on lines +85 to +87

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--notes-file Changes.md \
--draft \
--prerelease
--notes-file Changes.md \
--draft \
--prerelease

Please add newline at end of file.

Loading