Skip to content

Commit 4d2bfd8

Browse files
committed
Test publish
1 parent 84b26e2 commit 4d2bfd8

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: publish-release
2+
3+
on:
4+
release:
5+
types: [ created ]
6+
7+
if: !endsWith(github.ref, '-test')
8+
9+
10+
jobs:
11+
package:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/[email protected]
15+
- name: Set up Python
16+
uses: actions/[email protected]
17+
with:
18+
python-version: "3.x"
19+
20+
- name: Install pypa/build
21+
run: python3 -m pip install build --user
22+
23+
- name: Build a binary wheel and a source tarball
24+
run: python3 -m build
25+
26+
- name: Store the distribution packages
27+
uses: actions/[email protected]
28+
with:
29+
name: client-python-distributions
30+
path: dist/
31+
32+
publish-test:
33+
runs-on: ubuntu-latest
34+
needs: package
35+
environment:
36+
name: testpypi
37+
url: https://test.pypi.org/p/animatedledstrip-client
38+
permissions:
39+
id-token: write
40+
steps:
41+
- name: Download artifact
42+
uses: actions/[email protected]
43+
with:
44+
name: client-python-distributions
45+
path: dist/
46+
47+
- name: Publish to PyPi
48+
uses: pypa/gh-action-pypi-publish@release/v1
49+
with:
50+
repository-url: https://test.pypi.org/legacy/
51+
52+
# publish:
53+
# runs-on: ubuntu-latest
54+
# needs: package
55+
# environment:
56+
# name: pypi
57+
# url: https://pypi.org/p/animatedledstrip-client
58+
# permissions:
59+
# id-token: write
60+
# steps:
61+
# - name: Download artifact
62+
# uses: actions/[email protected]
63+
# with:
64+
# name: client-python-distributions
65+
# path: dist/
66+
#
67+
# - name: Publish to PyPi
68+
# uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)