Bump softprops/action-gh-release from 1 to 2 #1118
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: ci | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*' | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: ['3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: install dependencies | |
run: python3 -m pip install .[dev] | |
- name: test | |
run: pytest --cov musiclib | |
- name: lint | |
run: pre-commit run --all-files | |
publish-to-pypi-and-github-release: | |
runs-on: ubuntu-latest | |
if: "startsWith(github.ref, 'refs/tags')" | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install pypa/build | |
run: python -m pip install --upgrade setuptools build twine | |
- name: Build a source tarball and wheel | |
run: python -m build . | |
- name: upload to pypi | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: python -m twine upload dist/* | |
- name: Github Release | |
uses: softprops/action-gh-release@v2 |