Skip to content

Commit 25dc039

Browse files
Create release before updating it
1 parent 9cffdfe commit 25dc039

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/publish-stable-release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ jobs:
1111
permissions:
1212
contents: write
1313
steps:
14+
- name: Create release
15+
run: |
16+
echo "ID: ${{ needs.extractChangelog.outputs.release-id }}"
17+
echo "Repo: ${{ github.repository }}"
18+
curl -L \
19+
-X POST \
20+
-H "Accept: application/vnd.github+json" \
21+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
22+
-H "X-GitHub-Api-Version: 2022-11-28" \
23+
"https://api.github.com/repos/matthewrfennell/Monal/releases" \
24+
-d '{"tag_name":"v1.0.0","target_commitish":"master","name":"v1.0.0","body":"Description of the release","draft":false,"prerelease":false,"generate_release_notes":false}'
1425
- name: Promote draft release to live release
1526
run: |
1627
echo "ID: ${{ needs.extractChangelog.outputs.release-id }}"
@@ -20,5 +31,5 @@ jobs:
2031
-H "Accept: application/vnd.github+json" \
2132
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
2233
-H "X-GitHub-Api-Version: 2022-11-28" \
23-
"https://api.github.com/repos/matthewrfennell/Monal/releases/194212817" \
34+
"https://api.github.com/repos/matthewrfennell/Monal/releases/1" \
2435
-d '{"draft": false, "prerelease": false, "make_latest": true}'

0 commit comments

Comments
 (0)