Merge branch 'main' of https://github.com/alleninstitute/np_workflows #56
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
# This workflow will bump version, publish to PYPI, commit with version tag, | |
# push to remote. | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Publish Python package | |
on: | |
push: | |
branches: [ "main" ] | |
# pull_request: | |
# branches: [ "main" ] | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
jobs: | |
package: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.11"] | |
permissions: write-all | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pdm-project/setup-pdm@v3 | |
with: | |
version: 'head' | |
python-version: ${{ matrix.python-version }} | |
update-python: true | |
cache: true | |
- name: Install packaging dependencies | |
run: | | |
pip install "pdm-bump>=0.7.3" | |
- name: Install package | |
run: | | |
pdm install | |
- name: Bump project version | |
run: | | |
pdm bump micro | |
- name: Publish | |
run: | | |
pdm publish | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: "Bump [skip actions]" | |
- name: Tag commit | |
run: | | |
pdm bump tag | |
git push --tags |