Semantic Release #10
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: Semantic Release | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseType: | |
description: "version update type" | |
required: true | |
type: choice | |
default: "automatic" | |
options: | |
- "automatic" | |
- "major" | |
- "minor" | |
- "patch" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
concurrency: release | |
permissions: | |
id-token: write | |
contents: write | |
environment: | |
name: pypi | |
url: https://pypi.org/p/dbally | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Python Semantic Release Manual | |
id: release_manual | |
if: ${{ github.event.inputs.releaseType != 'automatic' }} | |
uses: python-semantic-release/python-semantic-release@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
force: ${{ github.event.inputs.releaseType }} | |
changelog: false | |
- name: Python Semantic Release Automatic | |
id: release_automatic | |
if: ${{ github.event.inputs.releaseType == 'automatic' }} | |
uses: python-semantic-release/python-semantic-release@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
changelog: false | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: steps.release_manual.outputs.released == 'true' || steps.release_automatic.outputs.released == 'true' |