Skip to content

Commit b0d9f9e

Browse files
authored
Merge pull request #136 from consideRatio/gha-release-workflow
ci: add publish to pypi workflow
2 parents 1d5b3b8 + fdb9f82 commit b0d9f9e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/publish.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This is a GitHub workflow defining a set of jobs with a set of steps.
2+
# ref: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
3+
#
4+
# Publish to PyPI on push of version like tags
5+
#
6+
name: Publish
7+
8+
on:
9+
push:
10+
tags: v?[0-9]+.[0-9]+.[0-9]+*
11+
12+
jobs:
13+
publish-to-pypi:
14+
name: Publish to PyPI
15+
runs-on: ubuntu-20.04
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.8
21+
22+
- name: Install build package
23+
run: |
24+
pip install --upgrade pip
25+
pip install build
26+
pip freeze
27+
28+
- name: Build release
29+
run: |
30+
python -m build --sdist --wheel .
31+
ls -alh dist
32+
33+
- name: Publish to PyPI
34+
uses: pypa/[email protected]
35+
with:
36+
user: __token__
37+
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)