Skip to content

Release 0.8.0rc5

Release 0.8.0rc5 #95

Workflow file for this run

name: Release
on:
push:
tags: ["v*"]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Check prerelease
id: check_version
run: |
if [[ "${{ github.ref }}" =~ ^refs/tags/v[0-9.]+rc[0-9]+$ ]]; then
echo "PRERELEASE=true" >> $GITHUB_OUTPUT
else
echo "PRERELEASE=false" >> $GITHUB_OUTPUT
fi
- name: Get Changelog
id: get-changelog
run: |
tags=$(git tag --sort=-version:refname | head -n 2 | awk '{print $1}')
tag_from=$(echo "$tags" | sed -n '2p')
tag_to=$(echo "$tags" | sed -n '1p')
git log --oneline --decorate "${tag_from}..${tag_to}" | tail -n +2 | awk '{print "* "$0}' > .changelog.md
- name: Create Release
uses: actions/create-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: .changelog.md
draft: false
prerelease: ${{ steps.check_version.outputs.PRERELEASE }}
- name: Set up PDM
run: pip install pdm==2.10.4
- name: Publish package distributions to PyPI
run: pdm publish -u "__token__" -P ${{ secrets.TWINE_PASSWORD }}