Skip to content
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

ci: add workflow for crate publishing #5005

Open
2 of 3 tasks
conorsch opened this issue Jan 24, 2025 · 3 comments · Fixed by #5105
Open
2 of 3 tasks

ci: add workflow for crate publishing #5005

conorsch opened this issue Jan 24, 2025 · 3 comments · Fixed by #5105
Labels
A-CI/CD Relates to continuous integration & deployment of Penumbra

Comments

@conorsch
Copy link
Contributor

conorsch commented Jan 24, 2025

Following up on the work to publish the workspace code to crates.io (#4978), we should add a CI workflow to automate that process. That work entails:

  • updating the crates auth to gh groups
  • generating a new CI token for use in CI
  • writing a workflow that runs on tags, and executes ./deployments/scripts/publish-crates

Once that's handled, the crate publishing will happen automatically as part of our existing release process.

@conorsch conorsch added the A-CI/CD Relates to continuous integration & deployment of Penumbra label Jan 24, 2025
@conorsch
Copy link
Contributor Author

Still not done; for v1.0.1 (#5021) I just published the crates manually using the script. They're live now: https://docs.rs/penumbra-sdk-app/1.0.1/penumbra_sdk_app/

@conorsch
Copy link
Contributor Author

As part of the v1.0.2 release (which should have been 1.1.0), I ran the publishing script manually, and it worked great, no problems. Fine to include in CI for next release, IMO.

For the crate ownership, I've started sending invites via API to adjust the setup, will comment when that's complete.

conorsch added a commit that referenced this issue Feb 25, 2025
Adds a simple workflow to handle publishing the workspace's crates to
crates.io. Will run whenever a new tag is pushed to the repo, and
publish the crates under that tag.

Closes #5005. Refs #5104, #4978.
@conorsch
Copy link
Contributor Author

Not quite: the job failed with error:

Run nix develop --command ./deployments/scripts/publish-crates
  nix develop --command ./deployments/scripts/publish-crates
  shell: /usr/bin/bash -e {0}
  env:
    CARGO_REGISTRY_TOKEN: ***
    NIX_PROFILES: /nix/var/nix/profiles/default /home/runner/.nix-profile
    NIX_USER_PROFILE_DIR: /nix/var/nix/profiles/per-user/runner
    NIX_SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
    NIX_USER_CONF_FILES: /tmp/tmp.dVshnKGBfb/flake-nixConfig.conf:/home/runner/.config/nix/nix.conf:
    CACHE_ON_FAILURE: false
    CARGO_INCREMENTAL: 0
Publishing crate versions '1.1.0' to crates.io...
error: cannot release from branch "HEAD", instead switch to "*, !HEAD"

which is due to the way github checks out gitrefs in CI contexts: we're not simply using the "main" branch in that context, even though that's where the tag was made.

@conorsch conorsch reopened this Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI/CD Relates to continuous integration & deployment of Penumbra
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant