Backport PyPI release #23
This file contains hidden or 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: Backport PyPI release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "PyPI version (for example 1.0)" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| jobs: | |
| gh-release: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| PACKAGE: lain-upload | |
| VERSION: ${{ inputs.version }} | |
| steps: | |
| - name: Download release files from PyPI | |
| run: | | |
| mkdir dist | |
| curl -fsSL \ | |
| "https://pypi.org/pypi/${PACKAGE}/${VERSION}/json" | | |
| jq -r '.urls[].url' | | |
| while read -r url; do | |
| curl -fsSL -O -J "$url" --output-dir dist | |
| done | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: v${{ inputs.version }} | |
| name: ${{ env.PACKAGE }} v${{ inputs.version }} | |
| files: dist/* | |
| generate_release_notes: true |