Fix release #296
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
on: | |
push: | |
tags: | |
- "v*.*.*" | |
branches: | |
- main | |
- fix-release | |
pull_request: {} | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" # Need to limit to specific python version because of 3.12 fails with `python3 -m build` step | |
- run: python3 -m pip install --upgrade build twine | |
- name: build package | |
run: | | |
export VERSION=0.0.0 | |
[[ "$GITHUB_REF" == "refs/tags/"* ]] && VERSION="${GITHUB_REF/refs\/tags\/v/}" | |
python3 -m build | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.TWINE_PASSWORD }} | |
if: startsWith(github.ref, 'refs/tags/') |