Skip to content

Release 0.7.0rc37

Release 0.7.0rc37 #78

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.7"
- 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
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.7"
- name: Publish package distributions to PyPI
run: pdm publish -u "__token__" -P ${{ secrets.TWINE_PASSWORD }}