-
Notifications
You must be signed in to change notification settings - Fork 54
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
docs: trusted publishing support #1194
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ac211fa
docs: OIDC support
Hofer-Julian 54d8df1
Update docs/authentication_and_upload.md
Hofer-Julian 43e8250
Update docs/authentication_and_upload.md
Hofer-Julian 052f50a
Newest action version
Hofer-Julian 528f2db
Fix typo
Hofer-Julian dad5a53
Adapt heading
Hofer-Julian add575f
Add screenshot
Hofer-Julian 5351885
Add title
Hofer-Julian 73c89be
Extend title
Hofer-Julian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,8 +56,45 @@ authenticate with the server. | |
|
||
### prefix.dev | ||
|
||
To upload to [prefix.dev](https://prefix.dev), you need to have an account and a | ||
token. You can create a token in the settings of your account. The token is used | ||
#### OpenID Connect (OIDC) | ||
|
||
`rattler-build` also supports OIDC with GitHub and prefix.dev. | ||
Hofer-Julian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
That way you don't need to manually retrieve and store a token. | ||
Hofer-Julian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
You only have to set up a specific repository and workflow under "Trusted Publishers" on prefix.dev. | ||
|
||
Here you can find an example GitHub Actions workflow | ||
|
||
Hofer-Julian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
```yaml | ||
wolfv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build conda package | ||
uses: prefix-dev/[email protected] | ||
|
||
- name: Upload all packages | ||
shell: bash | ||
run: | | ||
shopt -s nullglob | ||
EXIT_CODE=0 | ||
for pkg in $(find output -type f \( -name "*.conda" -o -name "*.tar.bz2" \) ); do | ||
if ! rattler-build upload prefix -c my-channel "$file"; then | ||
EXIT_CODE=1 | ||
fi | ||
done | ||
exit $EXIT_CODE | ||
Hofer-Julian marked this conversation as resolved.
Show resolved
Hide resolved
tdejager marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
|
||
#### Token | ||
|
||
To upload to [prefix.dev](https://prefix.dev), you need to have an account. | ||
You can then create a token in the settings of your account. The token is used | ||
to authenticate the upload. | ||
|
||
```bash | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 we start calling it something like Trusted publishing via OIDC or so?
OIDC is very technical and trusted publishing is maybe easier to grasp (also if you know pypi of course).
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.
Adapted the heading