-
-
Notifications
You must be signed in to change notification settings - Fork 3k
switch to deploy environment and configure for pypi oidc #10925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
e2882bb
0ac84c6
48e1b77
d7def89
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
* 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
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -13,39 +13,55 @@ on: | |||||
| permissions: {} | ||||||
|
|
||||||
| jobs: | ||||||
|
|
||||||
| deploy: | ||||||
| if: github.repository == 'pytest-dev/pytest' | ||||||
|
|
||||||
| build: | ||||||
| runs-on: ubuntu-latest | ||||||
| timeout-minutes: 30 | ||||||
| timeout-minutes: 10 | ||||||
| environment: deploy | ||||||
| permissions: | ||||||
| contents: write | ||||||
| id-token: write # for pypi oidc publish | ||||||
|
|
||||||
| steps: | ||||||
| - uses: actions/checkout@v3 | ||||||
| with: | ||||||
| fetch-depth: 0 | ||||||
| persist-credentials: false | ||||||
|
|
||||||
| - name: Build and Check Package | ||||||
| uses: hynek/[email protected] | ||||||
|
|
||||||
| deploy: | ||||||
| if: github.repository == 'pytest-dev/pytest' | ||||||
| needs: [build] | ||||||
| runs-on: ubuntu-latest | ||||||
| timeout-minutes: 30 | ||||||
| environment: deploy | ||||||
| permissions: | ||||||
| id-token: write # for pypi oidc publish | ||||||
| steps: | ||||||
| - name: Download Package | ||||||
| uses: actions/download-artifact@v3 | ||||||
| with: | ||||||
| name: Packages | ||||||
| path: dist | ||||||
|
|
||||||
| - name: Publish package to PyPI | ||||||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||||||
|
||||||
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| uses: pypa/gh-action-pypi-publish@v1.8.5 |
(I just tested this version with pytest-mock and it worked flawlessly to publish it to test-pypi with trusted-publishers).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you leave a comment explaining why?
I ask because I think it is fine to do it (generate the contents + publish to GitHub releases) at this point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expanded the comment, ready for merge i think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we do not need the
deployenvironment to build the package?