Bump actions/setup-python from 4 to 5 #15
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: release | |
on: | |
# Always test on pull_request, but do not do release (see check for tag below) | |
pull_request: | |
push: | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- uses: actions/setup-python@v5 | |
- run: sudo apt-get install -y libmad0-dev | |
- run: python -m pip install --upgrade pip | |
- run: python -m pip install build | |
- run: python -m build --sdist --outdir dist/ | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- uses: softprops/action-gh-release@v1 | |
# Only on a tag | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
with: | |
generate_release_notes: true | |
files: | | |
dist/* | |
publish: | |
needs: [build, release] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
# Only on a tag | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') |