Skip to content

Commit b6c5578

Browse files
nicoddemusRonnyPfannschmidt
andauthoredJul 3, 2023
Switch to deploy environment and configure for pypi oidc (#10925) (#11162)
Closes #10871 Closes #10870 Co-authored-by: Ronny Pfannschmidt <[email protected]>
1 parent fb03d13 commit b6c5578

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed
 

‎.github/workflows/deploy.yml

+27-13
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,54 @@ on:
1313
permissions: {}
1414

1515
jobs:
16-
17-
deploy:
18-
if: github.repository == 'pytest-dev/pytest'
19-
16+
build:
2017
runs-on: ubuntu-latest
21-
timeout-minutes: 30
22-
permissions:
23-
contents: write
24-
18+
timeout-minutes: 10
2519
steps:
2620
- uses: actions/checkout@v3
2721
with:
2822
fetch-depth: 0
2923
persist-credentials: false
30-
3124
- name: Build and Check Package
3225
uses: hynek/build-and-inspect-python-package@v1.5
3326

27+
deploy:
28+
if: github.repository == 'pytest-dev/pytest'
29+
needs: [build]
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 30
32+
permissions:
33+
id-token: write
34+
steps:
3435
- name: Download Package
3536
uses: actions/download-artifact@v3
3637
with:
3738
name: Packages
3839
path: dist
39-
4040
- name: Publish package to PyPI
41-
uses: pypa/gh-action-pypi-publish@release/v1
42-
with:
43-
password: ${{ secrets.pypi_token }}
41+
uses: pypa/gh-action-pypi-publish@v1.8.5
42+
43+
release-notes:
4444

45+
# todo: generate the content in the build job
46+
# the goal being of using a github action script to push the release data
47+
# after success instead of creating a complete python/tox env
48+
needs: [deploy]
49+
runs-on: ubuntu-latest
50+
timeout-minutes: 30
51+
permissions:
52+
contents: write
53+
steps:
54+
- uses: actions/checkout@v3
55+
with:
56+
fetch-depth: 0
57+
persist-credentials: false
4558
- name: Set up Python
4659
uses: actions/setup-python@v4
4760
with:
4861
python-version: "3.7"
4962

63+
5064
- name: Install tox
5165
run: |
5266
python -m pip install --upgrade pip

0 commit comments

Comments
 (0)
Please sign in to comment.