Skip to content

Commit 1cf2496

Browse files
authored
Update release.yml
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent 3ebad30 commit 1cf2496

1 file changed

Lines changed: 10 additions & 13 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -294,17 +294,14 @@ jobs:
294294
"$DIST_DIR/NOTICE" \
295295
"$DIST_DIR/bom.json"
296296
- name: Create Release
297+
id: release
298+
# see https://github.com/softprops/action-gh-release
299+
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
297300
env:
298-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
299-
VERSION: ${{ needs.bump.outputs.version }}
300-
VERSION_PLAIN: ${{ needs.bump.outputs.version_plain }}
301-
PRERELEASE: ${{ github.event.inputs.prerelease }}
302-
run: |
303-
set -exu
304-
ARGS=("$VERSION" --title "$VERSION_PLAIN" --notes "")
305-
if [[ "$PRERELEASE" == "true" ]]; then
306-
ARGS+=(--prerelease)
307-
fi
308-
ARGS+=("$ASSETS_DIR"/*)
309-
# Create the release, or upload assets if a release for the tag already exists
310-
gh release create "${ARGS[@]}" || gh release upload "$VERSION" "$ASSETS_DIR"/*
301+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
302+
with:
303+
tag_name: ${{ needs.bump.outputs.version }}
304+
name: ${{ needs.bump.outputs.version_plain }}
305+
prerelease: ${{ github.event.inputs.prerelease }}
306+
files: '${{ env.ASSETS_DIR }}/*'
307+
# If a tag already has a GitHub release, the existing release will be updated with the release assets.

0 commit comments

Comments
 (0)