Skip to content

Commit 504040e

Browse files
Update make-update-github-releases.yml
Signed-off-by: LUIZ HAMILTON ROBERTO DA SILVA <[email protected]>
1 parent 49a5e93 commit 504040e

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

.github/workflows/make-update-github-releases.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -155,22 +155,26 @@ jobs:
155155
echo "No changelog available." > extracted-changelog.md
156156
fi
157157
158-
- name: Create GitHub Release
159-
id: create_release
160-
uses: actions/[email protected]
161-
with:
162-
tag_name: ${{ env.VERSION_TAG }}
163-
release_name: ${{ env.VERSION_TAG }}
164-
body_path: extracted-changelog.md
165-
draft: false
166-
prerelease: false
158+
- name: Create GitHub Release via CLI
167159
env:
168160
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
161+
run: |
162+
gh release create "$VERSION_TAG" \
163+
--title "$VERSION_TAG" \
164+
--notes-file extracted-changelog.md \
165+
--target "$GITHUB_SHA" \
166+
--latest
167+
168+
- name: Fetch Release Upload URL
169+
id: fetch_url
170+
run: |
171+
url=$(gh api repos/${{ github.repository }}/releases/tags/$VERSION_TAG --jq '.upload_url')
172+
echo "upload_url=$url" >> $GITHUB_OUTPUT
169173
170174
- name: Upload Release Zip
171175
uses: actions/upload-release-asset@v1
172176
with:
173-
upload_url: ${{ steps.create_release.outputs.upload_url }}
177+
upload_url: ${{ steps.fetch_url.outputs.upload_url }}
174178
asset_path: artifacts/${{ matrix.release_name }}.zip
175179
asset_name: ${{ matrix.release_name }}.zip
176180
asset_content_type: application/zip
@@ -180,7 +184,7 @@ jobs:
180184
- name: Upload SHA256 Checksum
181185
uses: actions/upload-release-asset@v1
182186
with:
183-
upload_url: ${{ steps.create_release.outputs.upload_url }}
187+
upload_url: ${{ steps.fetch_url.outputs.upload_url }}
184188
asset_path: artifacts/${{ matrix.release_name }}.sha256.txt
185189
asset_name: ${{ matrix.release_name }}.sha256.txt
186190
asset_content_type: text/plain

0 commit comments

Comments
 (0)