Skip to content

Release (Manual)

Release (Manual) #39

Workflow file for this run

name: Release (Manual)
on:
# Enable execution directly from Actions page
workflow_dispatch:
inputs:
bump-version:
description: 'Bump Level?'
type: choice
options:
- 'major'
- 'minor'
- 'patch'
- 'prerelease'
required: true
as-prerelease:
description: 'As pre-release?'
type: boolean
required: true
default: false
# default token permissions = none
permissions: {}
jobs:
validate:
uses: ./.github/workflows/validate.yml
permissions: {}
secrets: {}
release:
name: Semantic Release
concurrency: release
runs-on: ubuntu-latest
if: github.repository == 'python-semantic-release/publish-action'
needs:
- validate
permissions:
contents: write
steps:
# Note: we need to checkout the repository at the workflow sha in case during the workflow
# the branch was updated. To keep PSR working with the configured release branches,
# we force a checkout of the desired release branch but at the workflow sha HEAD.
- name: Setup | Checkout Repository at workflow sha
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
ref: ${{ github.sha }}
- name: Setup | Force correct release branch on workflow sha
run: |
git checkout -B ${{ github.ref_name }}
- name: Release | Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@bd8f84cb4e967bb634d20b6080cf2d402966bccb # v10.5.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
verbosity: 2
config_file: releaserc.toml
force: ${{ github.event.inputs.bump-version }}
prerelease: ${{ github.event.inputs.as-prerelease }}
changelog: false