Skip to content

Merge branch 'main' of github.com:Precis-Digital/pandabear #1

Merge branch 'main' of github.com:Precis-Digital/pandabear

Merge branch 'main' of github.com:Precis-Digital/pandabear #1

Workflow file for this run

name: Version Bump and Publish to PyPI
on:
push:
branches:
- main
jobs:
bump_version:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-latest
name: "Bump version and create changelog with commitizen"
steps:
- id: get-github-app-token
name: Get GitHub App Token
uses: getsentry/[email protected]
with:
app_id: ${{ secrets.ORG_AUTOMATOR_ID }}
private_key: ${{ secrets.ORG_AUTOMATOR_KEY }}
- id: check-out
name: Check out
uses: actions/checkout@v2
with:
fetch-depth: 0
token: "${{ steps.get-github-app-token.outputs.token }}"
- id: cz
name: Bump and changelog using commitizen
uses: commitizen-tools/[email protected]
with:
github_token: ${{ steps.get-github-app-token.outputs.token }}
- id: print-version
name: Print Version
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"
build:
needs: bump_version # Only runs after bump_version job completes successfully
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: pip install setuptools wheel twine
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}