Skip to content

Commit d09f9b7

Browse files
committed
add GH release + PyPI push GH Action config
1 parent db0130a commit d09f9b7

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/publish-release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
6+
7+
name: Create and Publish Release
8+
9+
jobs:
10+
build:
11+
name: Create and Publish Release
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: [3.8]
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install --upgrade setuptools wheel twine
26+
- name: Create GitHub release
27+
id: create_release
28+
uses: actions/create-release@v1
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
with:
32+
tag_name: ${{ github.ref }}
33+
release_name: ${{ github.ref }}
34+
body: |
35+
Please see the root of the repository for the CHANGELOG.md
36+
draft: false
37+
prerelease: false
38+
- name: Build and publish to PyPI
39+
env:
40+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
41+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
42+
run: |
43+
make dist-build
44+
twine upload dist/*

0 commit comments

Comments
 (0)