Skip to content

Commit 76ae840

Browse files
split deploy step into 3 to manage permissions
* the build step builds using baipp * the deploy step does only the pypi upload * the release-notes step udpdates the release notes ## needed followups * [ ] upstream release from artifact to pypi-publish * [ ] generate content of release notes in baipp step
1 parent ef211c3 commit 76ae840

File tree

1 file changed

+28
-12
lines changed

1 file changed

+28
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,55 @@ 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
18+
timeout-minutes: 10
2219
environment: deploy
23-
permissions:
24-
contents: write
25-
id-token: write # for pypi oidc publish
26-
2720
steps:
2821
- uses: actions/checkout@v3
2922
with:
3023
fetch-depth: 0
3124
persist-credentials: false
32-
3325
- name: Build and Check Package
3426
uses: hynek/[email protected]
3527

28+
deploy:
29+
if: github.repository == 'pytest-dev/pytest'
30+
needs: [build]
31+
runs-on: ubuntu-latest
32+
timeout-minutes: 30
33+
environment: deploy
34+
permissions:
35+
id-token: write # for pypi oidc publish
36+
steps:
3637
- name: Download Package
3738
uses: actions/download-artifact@v3
3839
with:
3940
name: Packages
4041
path: dist
41-
4242
- name: Publish package to PyPI
4343
uses: pypa/gh-action-pypi-publish@release/v1
4444

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

5066
- name: Install tox
5167
run: |

0 commit comments

Comments
 (0)