Skip to content

Commit b89286c

Browse files
committed
ci: test uploading to test.pypi.org
Signed-off-by: Yves Bastide <yves@botify.com>
1 parent 62c4fd2 commit b89286c

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/build.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Build simpleflow"
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- run: python setup.py sdist bdist_wheel
14+
- uses: actions/upload-artifact@v3
15+
with:
16+
name: simpleflow
17+
path: dist
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Publish release to TestPyPI"
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- build
7+
types:
8+
- completed
9+
branches:
10+
- main
11+
12+
jobs:
13+
publish-testpypi:
14+
name: Upload release to TestPyPI
15+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
16+
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
17+
runs-on: ubuntu-latest
18+
environment:
19+
name: test-release
20+
url: https://test.pypi.org/p/simpleflow
21+
permissions:
22+
id-token: write
23+
steps:
24+
- uses: actions/checkout@v3
25+
26+
- uses: actions/download-artifact@v3
27+
with:
28+
name: simpleflow
29+
30+
- name: Publish package distributions to TestPyPI
31+
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e
32+
with:
33+
repository-url: https://test.pypi.org/legacy/
34+
verbose: true
35+
print-hash: true

0 commit comments

Comments
 (0)