Skip to content

Commit b4ba860

Browse files
Replace deprecated create-release action with GitHub CLI (#383)
1 parent d9a6f71 commit b4ba860

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/build-python-packages.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,18 @@ jobs:
199199

200200
- name: Publish Release ${{ env.VERSION }}
201201
id: create_release
202-
uses: actions/create-release@v1
203-
env:
204-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
205-
with:
206-
tag_name: ${{ env.VERSION }}-${{ github.run_id }}
207-
release_name: ${{ env.VERSION }}
208-
body: |
209-
Python ${{ env.VERSION }}
202+
env:
203+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
204+
shell: bash
205+
run: |
206+
tag_name="${{ env.VERSION }}-${{ github.run_id }}"
207+
gh release create "$tag_name" \
208+
--repo="$GITHUB_REPOSITORY" \
209+
--title="${{ env.VERSION }}" \
210+
--notes="Python ${{ env.VERSION }}"
211+
212+
release_id=$(gh release view "$tag_name" --repo "$GITHUB_REPOSITORY" --json databaseId --jq '.databaseId')
213+
echo "id=$release_id" >> $GITHUB_OUTPUT
210214
211215
- name: Generate hash for packages
212216
run: |

0 commit comments

Comments
 (0)