Skip to content

Release: Python

Release: Python #48

name: "Release: Python"
env:
WORKING_DIRECTORY: bindings/python
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
permissions:
contents: write
jobs:
publish:
name: Version
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.WORKING_DIRECTORY }}
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set Git author
run: |
git config user.name "Bot"
git config user.email "[email protected]"
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: 'Install dependencies'
run: pip install --upgrade bump2version
- name: Bumpversion
run: bumpversion ${{ github.event.inputs.version }} --allow-dirty --tag-name "python-v{new_version}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.PAT}}