forked from segmentio/analytics-python
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (38 loc) · 1.06 KB
/
Copy pathrelease.yml
File metadata and controls
45 lines (38 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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/*