Skip to content

Release

Release #9

Workflow file for this run

name: Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install
- name: Configure Git
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Bump version and update changelog
id: bump
run: |
output=$(poetry run cz bump --yes)
tag=$(echo "$output" | grep "tag to create:" | awk '{print $4}')
echo "::set-output name=version::${tag}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build package
run: poetry build
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body_path: CHANGELOG.md
tag_name: ${{ steps.bump.outputs.version }}
files: |
dist/*.whl
dist/*.tar.gz