Move to CI-based release process#4265
Move to CI-based release process#4265trixter-osec wants to merge 4 commits intosolana-foundation:masterfrom
Conversation
|
@trixter-osec is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
Signed-off-by: Stepan Fedotov <trixter@osec.io>
a6052e7 to
f0e5d84
Compare
|
Maybe we can move the logic of publishing into shared reusable workflows ( |
I'll play around and see what I can come up with, though the two release workflows being separate is mostly intended decision to be explicitly clear what happens during the release process. Although on a high level the process is similar between the two workflows, there's some minor differences (e.g. |
|
Yeah, I was imagining something like if ${WORKFLOW_DRY_RUN}; then
cargo build
else
cargo publish
fietc to make it clear which steps are the ones that are being swapped out. |
2482d4f to
9d36b39
Compare
| name = "avm" | ||
| version = "0.32.1" | ||
| version.workspace = true | ||
| publish = false |
There was a problem hiding this comment.
Hmm, I think we probably want to publish this with the rest as it has historically followed the versioning scheme
We actually don't use crates.io for avm
4f67de0 to
a331a13
Compare
Updates the existing release process to the proposed release process that is done fully in CI. In practice, the release process now consists of the following steps:
bump-version.shscriptmasterwith those changes. This triggers dry-run of release process (or as close to it as we can be) to confirm that everything builds and is publishableMy understanding is that the typedocs are handled automatically by Vercel on merge to
master, so it has been untouched in this PR, though let me know if this is not the case.This has been tested against monkey-patched version pointing at my own packages for testing this with a subset of the packages, and hopefully the PR-specific release dry-run will catch any issues in advance as well. The verify-tag job has been verified with 1) non-signed tag (doesn't pass), 2) signed tag not belonging to any specific account (doesn't pass), 3) signed tag belonging to a release manager's account (passes).
The diff also contains
repository.urlinpackage.jsonbeing renamed, which is needed for npmjs build attestation to pass as it verifies that the repository URL matches the CI's repository.Manual changes required before merging this PR
releaseDOCKERHUB_USERNAMEand secretDOCKERHUB_TOKENforsolanafoundation/anchor(unfortunately, Dockerhub does not allow OIDC)RELEASE_MANAGERSvariable, which is comma separated list of GitHub usernames that are allowed to push releases. This is used to pull their GitHub GPG key and verify that the tag is signed with their key before proceeding with the release process.anchor-release-managerswith all of the release managers in itOnly release managers can create tags, withRestrict creationsfor all tags. Theanchor-release-managersteam should be added to the bypass list.Restrict tag management, withRestrict updates,Restrict deletions,Block force pushesfor all tags.release.yaml, and environment name ofrelease:@anchor-lang/borsh@anchor-lang/spl-token@anchor-lang/core@anchor-lang/errors@anchor-lang/spl-associated-token(this is not published though, if the plan is to keep publishing it an empty repository could be published to claim the name and setup trusted publishing)@anchor-lang/spl-binary-option(this is not published though, if the plan is to keep publishing it an empty repository could be published to claim the name and setup trusted publishing)@anchor-lang/spl-binary-oracle-pair(this is not published though, if the plan is to keep publishing it an empty repository could be published to claim the name and setup trusted publishing)@anchor-lang/spl-feature-proposal(this is not published though, if the plan is to keep publishing it an empty repository could be published to claim the name and setup trusted publishing)@anchor-lang/spl-governance(this is not published though, if the plan is to keep publishing it an empty repository could be published to claim the name and setup trusted publishing)@anchor-lang/spl-memo(this is not published though, if the plan is to keep publishing it an empty repository could be published to claim the name and setup trusted publishing)@anchor-lang/spl-name-service(this is not published though, if the plan is to keep publishing it an empty repository could be published to claim the name and setup trusted publishing)@anchor-lang/spl-record(this is not published though, if the plan is to keep publishing it an empty repository could be published to claim the name and setup trusted publishing)@anchor-lang/spl-stake-pool(this is not published though, if the plan is to keep publishing it an empty repository could be published to claim the name and setup trusted publishing)@anchor-lang/spl-stateless-asks(this is not published though, if the plan is to keep publishing it an empty repository could be published to claim the name and setup trusted publishing)@anchor-lang/spl-token-lending(this is not published though, if the plan is to keep publishing it an empty repository could be published to claim the name and setup trusted publishing)@anchor-lang/spl-token-swap(this is not published though, if the plan is to keep publishing it an empty repository could be published to claim the name and setup trusted publishing)release.yaml, and environment name ofrelease:anchor-synanchor-splanchor-langanchor-derive-spaceanchor-derive-serdeanchor-derive-accountsanchor-clientanchor-clianchor-attribute-stateanchor-attribute-programanchor-attribute-eventanchor-attribute-erroranchor-attribute-constantanchor-attribute-accountanchor-attribute-access-controlEventually, we would also want to restrict
Publishing accessin npmjs toRequire two-factor authentication and disallow tokens (recommended)andRequire trusted publishing for all new versionsin crates.io, though for now this is not strictly necessary as we want to confirm the release process works before that.