Skip to content

Commit e9e421c

Browse files
committed
Reimplement release creation
1 parent c9dd1e8 commit e9e421c

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/dist.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,27 @@ jobs:
119119
with:
120120
name: dist
121121
path: dist
122-
- uses: softprops/action-gh-release@v2
122+
- name: Create release
123+
env:
124+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125+
run: |
126+
latest_release_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases \
127+
| jq -r 'sort_by(.created_at) | last(.[]).tag_name')
128+
curl -L \
129+
-X POST \
130+
-H "Accept: application/vnd.github+json" \
131+
-H "Authorization: Bearer $GITHUB_TOKEN" \
132+
-H "X-GitHub-Api-Version: 2022-11-28" \
133+
https://api.github.com/repos/${{ github.repository }}/releases \
134+
-d "{
135+
\"tag_name\": \"${{ github.ref_name }}\",
136+
\"previous_tag_name\": \"${latest_release_tag}\",
137+
\"prerelease\": ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }},
138+
\"generate_release_notes\": true
139+
}"
140+
- name: Create release assets
141+
uses: softprops/action-gh-release@v2
123142
with:
124-
generate_release_notes: true
125-
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
126143
files: |
127144
dist/*
128145
upstream/*

0 commit comments

Comments
 (0)