File tree Expand file tree Collapse file tree 2 files changed +47
-47
lines changed
Expand file tree Collapse file tree 2 files changed +47
-47
lines changed Original file line number Diff line number Diff line change 1+ name : CD
2+
3+ on :
4+ workflow_dispatch :
5+ release :
6+ types :
7+ - published
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ env :
14+ FORCE_COLOR : 3
15+
16+ jobs :
17+ dist :
18+ needs : [pre-commit]
19+ name : Distribution build
20+ runs-on : ubuntu-latest
21+
22+ steps :
23+ - uses : actions/checkout@v3
24+ with :
25+ fetch-depth : 0
26+
27+ - name : Build sdist and wheel
28+ uses : hynek/build-and-inspect-python-package@v1
29+
30+ publish :
31+ needs : [dist]
32+ name : Publish to PyPI
33+ environment :
34+ name : pypi
35+ url : https://pypi.org/p/dynamic-metadata
36+ permissions :
37+ id-token : write
38+ runs-on : ubuntu-latest
39+ if : github.event_name == 'release' && github.event.action == 'published'
40+
41+ steps :
42+ - uses : actions/download-artifact@v3
43+ with :
44+ name : Packages
45+ path : dist
46+
47+ - uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 55 pull_request :
66 push :
77 branches :
8- - master
98 - main
10- - develop
11- release :
12- types :
13- - published
149
1510concurrency :
1611 group : ${{ github.workflow }}-${{ github.ref }}
7267
7368 - name : Upload coverage report
746975-
76- dist :
77- needs : [pre-commit]
78- name : Distribution build
79- runs-on : ubuntu-latest
80-
81- steps :
82- - uses : actions/checkout@v3
83- with :
84- fetch-depth : 0
85-
86- - name : Build sdist and wheel
87- run : pipx run build
88-
89- - uses : actions/upload-artifact@v3
90- with :
91- path : dist
92-
93- - name : Check products
94- run : pipx run twine check dist/*
95-
96- publish :
97- needs : [dist]
98- name : Publish to PyPI
99- environment : pypi
100- permissions :
101- id-token : write
102- runs-on : ubuntu-latest
103- if : github.event_name == 'release' && github.event.action == 'published'
104-
105- steps :
106- - uses : actions/download-artifact@v3
107- with :
108- name : artifact
109- path : dist
110-
111- - uses : pypa/gh-action-pypi-publish@release/v1
112- if : github.event_name == 'release' && github.event.action == 'published'
113- with :
114- # Remember to tell (test-)pypi about this repo before publishing
115- # Remove this line to publish to PyPI
116- repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments