Skip to content

Merge pull request #33 from wild-edge/release/0.1.3 #4

Merge pull request #33 from wild-edge/release/0.1.3

Merge pull request #33 from wild-edge/release/0.1.3 #4

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
with:
fetch-depth: 0
- 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:
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