chore: Release 2.12.3 #183
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
release-pypi: | |
name: release-pypi | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Check prerelease | |
id: check_version | |
run: | | |
if [[ "${{ github.ref }}" =~ ^refs/tags/[0-9.]+$ ]]; then | |
echo "PRERELEASE=false" >> $GITHUB_OUTPUT | |
else | |
echo "PRERELEASE=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Build artifacts | |
run: | | |
python -m pip install build | |
python -m build | |
- name: Test Build | |
run: | | |
python -m pip install dist/*.whl | |
pdm --help | |
- name: Build Release Docs | |
run: | | |
pdm install -G doc | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git fetch origin gh-pages:gh-pages | |
tag="${{ github.ref_name }}" | |
DOC_VERSION=${tag%.*} | |
cd docs | |
pdm run mike deploy --no-redirect --update-aliases "$DOC_VERSION" latest | |
git push origin gh-pages | |
- name: Publish package distributions to PyPI | |
run: pdm publish --no-build | |
- name: Get Changelog | |
id: get-changelog | |
run: | | |
awk '/-{3,}/{flag=1;next}/Release/{if (flag==1)exit}flag' CHANGELOG.md > .changelog.md | |
- name: Create Release | |
uses: actions/create-release@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: v${{ github.ref }} | |
body_path: .changelog.md | |
draft: false | |
prerelease: ${{ steps.check_version.outputs.PRERELEASE }} | |
- name: Trigger Bucket Update | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: Excavator | |
repo: frostming/scoop-frostming | |
token: ${{ secrets.G_T }} | |
ref: master |