[DO NOT MERGE] Changelog CI/CD #6
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 to PyPi | |
on: | |
push: | |
tags: "v[0-9]+.[0-9]+.[0-9]+*" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
id-token: write | |
jobs: | |
build: | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: "3.8" | |
cache: true | |
- name: Build package | |
run: pdm build | |
- name: upload to github release | |
uses: docker://ghcr.io/antonyurchenko/git-release:v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# assume any version with "a" (gets "ALPHA") or "b" (gets BETA) or "rc" (release candidates) will be a prerelease | |
PRE_RELEASE: "${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}" | |
with: | |
args: dist/* |