Release (Manual) #2
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 (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: | |
build: | |
name: Verify Docker Build | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
ref: ${{ github.ref_name }} | |
- name: Build Docker Image | |
run: | | |
docker build -t psr-upload-to-release:latest . | |
release: | |
name: Semantic Release | |
runs-on: ubuntu-latest | |
concurrency: push | |
needs: [build] | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.ref_name }} | |
- name: Python Semantic Release | |
uses: python-semantic-release/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
root_options: "-vv -c releaserc.toml" | |
force: ${{ github.event.inputs.bump-version }} | |
prerelease: ${{ github.event.inputs.as-prerelease }} | |
changelog: false |