Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[bumpversion]
current_version = 0.0.2
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
serialize =
{major}.{minor}.{patch}
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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@v3

- uses: actions/setup-python@v4
with:
python-version: '3.x'
cache: 'pip'
cache-dependency-path: setup.py

- name: Install dependencies
run: |
python -m pip install bump2version twine wheel

- 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/*