Bump actions/upload-artifact from 4.4.3 to 4.5.0 #57
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
name: Build & Release | |
on: | |
workflow_dispatch: {} # allows triggering this workflow manually | |
pull_request: # trigger on pull requests affecting relevant files | |
branches: | |
- main | |
paths: | |
- '**workflows/release.yml' | |
- 'pyproject.toml' | |
release: # trigger on published release | |
types: | |
- published | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: ${{ github.event_name != 'release' }} | |
jobs: | |
build_package: | |
name: Build package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Build package | |
run: pipx run build | |
- name: List files | |
run: ls -l dist/ | |
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | |
with: | |
name: distribution | |
path: | | |
dist/*.tar.gz | |
dist/*.whl | |
upload_pypi: | |
name: Release & Upload to PyPI | |
# Only publish release to PyPI when a github release is created. | |
if: github.event_name == 'release' && github.event.action == 'published' | |
needs: build_package | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: distribution | |
path: dist | |
- name: List files | |
run: ls -l dist/ | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2 |