automatic-release #6
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: automatic-release | |
on: | |
workflow_dispatch: | |
inputs: | |
release_type: | |
description: Release type | |
required: true | |
type: choice | |
options: | |
- patch | |
- minor | |
- major | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Git | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install prerequisites | |
run: pip install -r release-requirements.txt | |
- name: Execute release | |
env: | |
SEMVER_BUMP: ${{ github.event.inputs.release_type }} | |
TWINE_REPOSITORY: ${{ vars.TWINE_REPOSITORY }} | |
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |
run: ./release $SEMVER_BUMP |