π Release #56
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: | |
workflow_dispatch: | |
inputs: | |
root_options: | |
description: "Options: semantic-release <options>, es: --noop" | |
required: false | |
type: string | |
force_py_release: | |
description: "Force Release on PyPI" | |
required: false | |
type: boolean | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
concurrency: release | |
name: Release to PyPI π | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: π Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: ποΈ Generate Version and Changelog with Semantic Release | |
id: release | |
uses: python-semantic-release/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
root_options: ${{ github.event.inputs.root_options || '-v' }} | |
- name: π§ Setup build environment | |
uses: actions/setup-python@v4 | |
if: steps.release.outputs.released == 'true' || github.event.inputs.force_py_release == 'true' | |
with: | |
python-version: "3.x" | |
cache: "pip" | |
- name: 𧩠Install build dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: π¦ Build package distributions | |
run: python -m build | |
- name: π€ Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: steps.release.outputs.released == 'true' || github.event.inputs.force_py_release == 'true' |