Start a New Release #65
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: Start a New Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version Tag in the form X.Y.Z' | |
required: true | |
type: string | |
jobs: | |
build: | |
if: github.actor != 'github-actions[bot]' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
with: | |
fetch-tags: true | |
ref: main | |
token: ${{ secrets.APP_SECRET }} # Needed to trigger other actions | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install hatch git-cliff | |
- name: Update changelog | |
run: | | |
git cliff -o CHANGELOG.md | |
- name: Bump version and create tag | |
run: | | |
hatch version ${{ inputs.version }} | |
hatch build | |
- name: Publish to PyPI | |
env: | |
HATCH_INDEX_USER: __token__ | |
HATCH_INDEX_AUTH: ${{ secrets.TEST_PASS_PYPI }} | |
run: | | |
hatch publish |