File tree 2 files changed +43
-33
lines changed
2 files changed +43
-33
lines changed Original file line number Diff line number Diff line change
1
+ name : deploy
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " *"
7
+
8
+ # Set permissions at the job level.
9
+ permissions : {}
10
+
11
+ jobs :
12
+ package :
13
+ runs-on : ubuntu-22.04
14
+ timeout-minutes : 10
15
+
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ with :
19
+ persist-credentials : false
20
+
21
+ - name : Build and Check Package
22
+ uses : hynek/build-and-inspect-python-package@2dbbf2b252d3a3c7cec7a810e3ed5983bd17b13a # v2.8.0
23
+
24
+ deploy :
25
+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pytest-django'
26
+ needs : [package]
27
+ runs-on : ubuntu-22.04
28
+ environment : deploy
29
+ timeout-minutes : 15
30
+ permissions :
31
+ contents : read
32
+ # For trusted publishing.
33
+ id-token : write
34
+
35
+ steps :
36
+ - name : Download Package
37
+ uses : actions/download-artifact@v4
38
+ with :
39
+ name : Packages
40
+ path : dist
41
+
42
+ - name : Publish package
43
+ uses : pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0
Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- main
7
- tags :
8
- - " *"
9
7
pull_request :
10
8
branches :
11
9
- main
@@ -126,34 +124,3 @@ jobs:
126
124
- name : pypy3-dj32-postgres
127
125
python : ' pypy3.9'
128
126
allow_failure : false
129
-
130
- deploy :
131
- if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pytest-django'
132
- runs-on : ubuntu-22.04
133
- timeout-minutes : 15
134
- permissions :
135
- contents : read
136
-
137
- steps :
138
- - uses : actions/checkout@v4
139
- with :
140
- fetch-depth : 0
141
- persist-credentials : false
142
-
143
- - uses : actions/setup-python@v5
144
- with :
145
- python-version : ' 3.12'
146
-
147
- - name : Install dependencies
148
- run : |
149
- python -m pip install --upgrade pip
150
- pip install --upgrade build
151
-
152
- - name : Build package
153
- run : python -m build
154
-
155
- - name : Publish package
156
- uses : pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0
157
- with :
158
- user : __token__
159
- password : ${{ secrets.pypi_token }}
You can’t perform that action at this time.
0 commit comments