-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (55 loc) · 1.54 KB
/
production.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
56
57
58
name: Bump version
on:
push:
branches: [master]
env:
GIT_USER_EMAIL: [email protected]
GIT_USER_NAME: fondeadora-tech
jobs:
bump:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: '${{ secrets.ACCESS_TOKEN }}'
fetch-depth: 0
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install -U commitizen
- name: Create Bump
run: |
git config --local user.email "$GIT_USER_EMAIL"
git config --local user.name "$GIT_USER_NAME"
cz bump --changelog --yes
- name: Push changes
uses: Woile/github-push-action@master
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
tags: "true"
release:
needs:
- bump
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/[email protected]
with:
python-version: 3.8
- name: Install dependencies
run: python -m pip install -qU setuptools wheel twine
- name: Generating distribution archives
run: python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
if: "!contains(github.event.head_commit.message, '[skip ci]')"
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}