Skip to content

Fix/cargo registry token#30

Merged
lriesebos merged 2 commits into
masterfrom
fix/cargo_registry_token
Jun 5, 2026
Merged

Fix/cargo registry token#30
lriesebos merged 2 commits into
masterfrom
fix/cargo_registry_token

Conversation

@lriesebos

@lriesebos lriesebos commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

follow up changes on #28 including tag/version check and cargo variables.

  1. added cargo version / tag match check
  2. added CARGO_REGISTRY_TOKEN env variable using crates.io trusted publishing

@gz , I did not see any secrets in the settings of this repo. will you add a cargo registry token?

@lriesebos lriesebos requested a review from gz June 3, 2026 02:26
@gz

gz commented Jun 3, 2026

Copy link
Copy Markdown
Owner

hey @lriesebos it should not be needed; I configured the repo for trusted publishing from .github/workflows/publish.yml

https://crates.io/docs/trusted-publishing

so all you need to so is mint the token during the action using the sample from the link, e.g., something like this

name: Publish to crates.io
on:
  push:
    tags: ['v*']  # Triggers when pushing tags starting with 'v'
jobs:
  publish:
    runs-on: ubuntu-latest
    environment: release  # Optional: for enhanced security
    permissions:
      id-token: write     # Required for OIDC token exchange
    steps:
    - uses: actions/checkout@v6
    - uses: rust-lang/crates-io-auth-action@v1
      id: auth
    - run: cargo publish
      env:
        CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

@gz gz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine as long as you get the registry token from the action

@lriesebos lriesebos force-pushed the fix/cargo_registry_token branch from 69970ae to ba516ab Compare June 5, 2026 03:02
@lriesebos

Copy link
Copy Markdown
Collaborator Author

new to publishing to crates.io, so appreciate the help. how about this?

@lriesebos lriesebos requested a review from gz June 5, 2026 03:03

@gz gz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@lriesebos lriesebos merged commit 512a8cb into master Jun 5, 2026
1 check passed
@lriesebos lriesebos deleted the fix/cargo_registry_token branch June 5, 2026 14:03
@gz

gz commented Jun 5, 2026

Copy link
Copy Markdown
Owner

looks like still some problem but it went furhter this time

https://github.com/gz/rust-uio/actions/runs/27023960269/job/79759025077

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants