File tree Expand file tree Collapse file tree 1 file changed +23
-6
lines changed Expand file tree Collapse file tree 1 file changed +23
-6
lines changed Original file line number Diff line number Diff line change 1
1
name : Publish packages to PyPI
2
2
3
3
on :
4
- create :
5
- tags : " *"
4
+ push :
5
+ tags :
6
+ - " [0-9]+.[0-9]+.[0-9]+"
7
+ - " [0-9]+.[0-9]+.[0-9]+.post[0-9]+"
8
+ - " [0-9]+.[0-9]+.[0-9]+[a-b][0-9]+"
9
+ - " [0-9]+.[0-9]+.[0-9]+rc[0-9]+"
6
10
7
11
jobs :
8
- publish :
12
+ build :
9
13
runs-on : ubuntu-latest
10
- if : startsWith(github.ref, 'refs/tags/')
14
+ environment : release
11
15
steps :
12
16
- uses : actions/checkout@v3
13
17
- name : Set up Python
18
22
run : pip install flit
19
23
- name : Create packages
20
24
run : flit build --setup-py
25
+ - name : Store package artifacts
26
+ uses : actions/upload-artifact@v3
27
+ with :
28
+ name : dist
29
+ path : dist
30
+
31
+ publish :
32
+ needs : build
33
+ runs-on : ubuntu-latest
34
+ environment : release
35
+ permissions :
36
+ id-token : write
37
+ steps :
38
+ - name : Retrieve package artifacts
39
+ uses : actions/download-artifact@v3
21
40
- name : Upload packages
22
41
uses : pypa/gh-action-pypi-publish@release/v1
23
- with :
24
- password : ${{ secrets.pypi_password }}
You can’t perform that action at this time.
0 commit comments