Skip to content

Release

Release #5

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version:
type: choice
description: The new version to build and publish
required: true
default: 'patch'
options:
- major
- minor
- patch
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.x'
cache: 'pip'
cache-dependency-path: setup.py
- name: Install dependencies
run: |
python -m pip install bump2version twine wheel setuptools
- name: Bump version
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
bumpversion --commit ${{ github.event.inputs.version }} customerio/analytics/version.py
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*