Skip to content

Commit cb9a3c4

Browse files
committed
Add workflow to publish to pypi
1 parent 6047af0 commit cb9a3c4

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
test:
10+
uses: ./.github/workflows/test.yml
11+
12+
publish:
13+
needs: [test]
14+
runs-on: ubuntu-latest
15+
environment:
16+
name: pypi
17+
url: https://pypi.org/project/haas/
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Setup python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.12"
24+
- name: Install build dependencies
25+
run: |
26+
pip install build
27+
- name: Build packages
28+
run: |
29+
python -m build
30+
- name: Publish package distributions to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
name: Test
22

33
on:
4+
workflow_call:
45
pull_request:
56
push:
67
branches:
78
- master
89
- maintenance/**
9-
tags:
10-
- "v*"
1110

1211
env:
1312
PYTHONUNBUFFERED: "1"

0 commit comments

Comments
 (0)