Request write permission in release workflow #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build: | |
uses: ./.github/workflows/build.yml | |
create_release: | |
needs: [build] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download wheels | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
merge-multiple: true | |
- name: Extract Changelog | |
run: | | |
VERSION=${GITHUB_REF#refs/*/} | |
sed -n "/^## \\[${VERSION:1}\\]/,/^## \\[/p" CHANGELOG.md | sed '1,1d; $d' > RELEASE.md | |
- name: Publish release to GitHub | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
body_path: RELEASE.md | |
files: dist/*.whl | |
- name: Publish release distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |