Merge pull request #55 from kevinbackhouse/version-0.0.4 #4
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 to PyPI | |
| on: | |
| push: | |
| tags: | |
| - v[0-9]+.[0-9]+.[0-9]+ | |
| jobs: | |
| publish: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| # This environment is required as an input to pypa/gh-action-pypi-publish | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/seclab-taskflows | |
| env: | |
| GITHUB_REPO: ${{ github.repository }} | |
| permissions: | |
| contents: write | |
| id-token: write # For trusted publishing | |
| attestations: write # For artifact attestation | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: "3.13" | |
| - name: Install Hatch | |
| run: pip install --upgrade hatch | |
| - name: Build the wheel | |
| run: python3 -m hatch build | |
| - name: Attest build provenance | |
| uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0 | |
| with: | |
| subject-path: ./dist/* | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 | |
| with: | |
| verbose: true | |
| - name: Create GitHub Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| RELEASE_NAME: ${{ github.ref_name }} | |
| run: gh release create $RELEASE_NAME dist/* --repo $GITHUB_REPO --generate-notes |