Skip to content

πŸš€ Release

πŸš€ Release #56

Workflow file for this run

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'