Merge pull request #26 from KiraPC/update-deps #14
Workflow file for this run
This file contains hidden or 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: Publish Release | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| pypi-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Get Tag Version | |
| id: vars | |
| run: echo "tag=${GITHUB_REF#refs/*/}" >> "$GITHUB_OUTPUT" | |
| - name: Set version in pyproject.toml | |
| env: | |
| RELEASE_VERSION: ${{ steps.vars.outputs.tag }} | |
| run: sed -i "s/^version = .*/version = \"$RELEASE_VERSION\"/" pyproject.toml | |
| - name: Build distribution package | |
| run: | | |
| pip install build | |
| python -m build | |
| - name: Publish package | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} |