Publish new PyPi build version #218
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: Publish new PyPi build version | |
on: | |
workflow_dispatch: | |
inputs: | |
bumpType: | |
description: Bump type | |
required: true | |
default: patch | |
type: choice | |
options: | |
- major | |
- minor | |
- patch | |
jobs: | |
publish: | |
name: PyPi Publishing | |
runs-on: ubuntu-latest | |
env: | |
POETRY_HTTP_BASIC_USERNAME: ${{ secrets.POETRY_HTTP_BASIC_USERNAME }} | |
POETRY_HTTP_BASIC_PASSWORD: ${{ secrets.POETRY_HTTP_BASIC_PASSWORD }} | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install Poetry | |
run: pipx install poetry | |
- name: Install Dependencies using Poetry | |
run: poetry install | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Configure poetry PyPi connection | |
run: poetry config http-basic.pypi $POETRY_HTTP_BASIC_USERNAME $POETRY_HTTP_BASIC_PASSWORD | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
- name: Release new PyPi build version | |
env: | |
BUMP_TYPE: ${{ inputs.bumpType }} | |
run: "/home/runner/work/dbt-coves/dbt-coves/publish.sh $BUMP_TYPE" |