-
Notifications
You must be signed in to change notification settings - Fork 208
43 lines (42 loc) · 1.18 KB
/
publish_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
name: Publish Monthly Release
on:
push:
branches:
- master
paths:
# triggered when version is bumped
- "setup.py"
- "CHANGELOG.md"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Get version
id: vers
run: |
pip install python-semantic-release
echo ::set-output name=version::$(semantic-release print-version --current)
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.vers.outputs.version }}
release_name: New Features & Bug Fixes
body_path: ./CHANGELOG.md
- name: Add wheel dependency
run: pip install wheel
- name: Generate dist
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}