Skip to content

Release 0.1.2 (#30)

Release 0.1.2 (#30) #3

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Ensure tag matches project version
if: github.ref_type == 'tag'
env:
TAG_NAME: ${{ github.ref_name }}
run: python scripts/check_tag_version.py
- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build package distributions
run: python -m build
- name: Check package metadata
run: twine check dist/*
- name: Generate release notes
if: github.ref_type == 'tag'
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
HEAD_REF: ${{ github.ref_name }}
TAG_NAME: ${{ github.ref_name }}
OUTPUT: /tmp/release-notes.md
run: python3 scripts/build_changelog_comment.py
- name: Create GitHub release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
files: dist/*
body_path: /tmp/release-notes.md
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1