fix: preparation for new release #31
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: Create Release and publish pypi package | |
| on: | |
| push: | |
| tags: | |
| - v[0-9]+.[0-9]+.* | |
| jobs: | |
| released: | |
| name: Released | |
| if: github.ref_type == 'tag' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout git repo | |
| uses: actions/checkout@v4 | |
| - name: Automated Version Bump | |
| id: changelog | |
| uses: Requarks/changelog-action@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{github.ref_name}} | |
| writeToFile: 'false' | |
| - name: Get variables | |
| id: get_variables | |
| run: | | |
| echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
| echo "IS_PRERELEASE=${{contains(github.ref, 'dev')}}" >> $GITHUB_OUTPUT | |
| - name: Publish release github | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| prerelease: ${{ steps.get_variables.outputs.IS_PRERELEASE }} | |
| tag_name: ${{ steps.get_variables.outputs.VERSION }} | |
| body: ${{ steps.changelog.outputs.changes }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine | |
| - name: Build and publish python package | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
| run: | | |
| python -m build | |
| twine upload dist/* |