0.7.0 #5
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: Publish package to PyPI | |
env: | |
PDM_PUBLISH_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: pdm publish --username __token__ --repository pypi | |
- name: upload to github release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
dist/* | |
# assume any version with "a" (gets "ALPHA") or "b" (gets BETA) will be a prerelease | |
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') }} |