Release #27
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: Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Release version (e.g., 2.11.4)' | |
| required: true | |
| type: string | |
| concurrency: | |
| group: release | |
| cancel-in-progress: false | |
| permissions: | |
| contents: none | |
| jobs: | |
| create_draft_release: | |
| name: Create Draft Release | |
| uses: ./.github/workflows/create_draft_release.yaml | |
| if: github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: write | |
| with: | |
| release_version: ${{ inputs.version }} | |
| publish_to_pypi: | |
| name: Publish to PyPI | |
| needs: | |
| - create_draft_release | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| id-token: write | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/python-minifier/${{ inputs.version }} | |
| steps: | |
| - name: Download distribution artifacts | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| pattern: dist-* | |
| path: dist/ | |
| merge-multiple: true | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 | |
| with: | |
| print-hash: true | |
| verbose: true | |
| publish_docs: | |
| name: Publish Documentation | |
| needs: | |
| - create_draft_release | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4.0.5 | |
| publish_release: | |
| name: Publish Release | |
| needs: | |
| - create_draft_release | |
| - publish_to_pypi | |
| - publish_docs | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Publish Release | |
| env: | |
| RELEASE_ID: ${{ needs.create_draft_release.outputs.release_id }} | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release edit "$RELEASE_ID" \ | |
| --repo ${{ github.repository }} \ | |
| --draft=false |