v2.1.0 #18
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: Release to GitHub | |
| on: | |
| release: | |
| types: [created, updated] | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Clean up old distribution | |
| run: bash clean_package.sh | |
| - name: Determine Package Version | |
| id: get_version | |
| run: echo "PKG_VERSION=$(bash get_version.sh)" >> $GITHUB_ENV | |
| - name: Build distribution | |
| run: bash build_package.sh | |
| - name: Upload artifacts to GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: dist/* | |
| append_body: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install twine | |
| run: python -m pip install twine | |
| - name: Publish package to PyPI | |
| run: twine upload dist/* | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} |