Skip to content

Commit d7bc348

Browse files
authored
Merge pull request #193 from minrk/publish
add release workflow
2 parents 4edbc28 + 624ab57 commit d7bc348

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/release.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release
2+
3+
# always build releases (to make sure wheel-building works)
4+
# but only publish to PyPI on tags
5+
on:
6+
pull_request:
7+
paths-ignore:
8+
- "docs/**"
9+
- ".github/workflows/**"
10+
- "!.github/workflows/release.yaml"
11+
push:
12+
paths-ignore:
13+
- "docs/**"
14+
- ".github/workflows/**"
15+
- "!.github/workflows/release.yaml"
16+
branches-ignore:
17+
- "dependabot/**"
18+
- "pre-commit-ci-update-config"
19+
tags:
20+
- "**"
21+
workflow_dispatch:
22+
23+
jobs:
24+
build-release:
25+
runs-on: ubuntu-20.04
26+
steps:
27+
- uses: actions/checkout@v3
28+
- uses: actions/setup-python@v4
29+
with:
30+
python-version: "3.10"
31+
32+
- name: install build package
33+
run: |
34+
pip install --upgrade pip
35+
pip install build
36+
pip freeze
37+
38+
- name: build release
39+
run: |
40+
python -m build --sdist --wheel .
41+
ls -l dist
42+
43+
- name: publish to pypi
44+
uses: pypa/[email protected]
45+
if: startsWith(github.ref, 'refs/tags/')
46+
with:
47+
user: __token__
48+
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)