-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (48 loc) · 1.86 KB
/
release.yml
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
46
47
48
49
50
51
52
53
54
55
name: release
on:
push:
branches:
- main
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Create changelog and release PR on normal commits. When release PR is merged,
# create a new release with the changelog in the release notes
- uses: google-github-actions/release-please-action@v3
id: release-please
with:
release-type: python
extra-files: |
tackle/__init__.py
changelog-types: |
[
{"type":"feat","section":"Features","hidden":false},
{"type":"fix","section":"Bug Fixes","hidden":false},
{"type":"perf","section":"Performance Improvements","hidden":false},
{"type":"refactor","section":"Refactors","hidden":false},
{"type":"revert","section":"Reversions","hidden":false},
{"type":"provider","section":"Provider Changes","hidden":false}
]
# Release to pypi if previous action resulted in creating a new release which
# happens when the release-please PR is merged
- name: Set up Python
if: ${{ steps.release-please.outputs.release_created }}
uses: actions/setup-python@v1
with:
python-version: "3.7"
- name: Install dependencies
if: ${{ steps.release-please.outputs.release_created }}
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine
- name: Package project
if: ${{ steps.release-please.outputs.release_created }}
run: python setup.py sdist bdist_wheel
- name: Upload distributions
if: ${{ steps.release-please.outputs.release_created }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*