ci: release through cyberuni OIDC and point metadata at cyberuni - #344
Merged
Conversation
🦋 Changeset detectedLatest commit: 4a1ad39 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #344 +/- ##
=======================================
Coverage 96.35% 96.35%
=======================================
Files 24 24
Lines 357 357
Branches 63 60 -3
=======================================
Hits 344 344
Misses 13 13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Tick the box to add this pull request to the merge queue (same as
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this does
Phase A of the modernization sweep for
assertron. It moves both CI jobs to cyberuni'sreusable workflows, replaces the long-lived
NPM_TOKEN/CI_GITHUB_TOKENrelease with npmtrusted publishing (OIDC), and points repository metadata at the post-transfer URLs.
Do not merge yet. This PR is deliberately written against the world after the repo is
transferred to
cyberuni. It lands only once the transfer and thenpm trustregistration forassertronhave happened.Workflows
pull-request.yml→cyberuni/.github/.github/workflows/pnpm-verify.yml@main, pinned toos: '["ubuntu-latest"]'(cyberuni's default matrix is 3 OS x 2 Node = 6 jobs; this package hasno platform-specific behaviour, so the full matrix triples CI cost for nothing) and
skip-playwright: true(no browser tests). Codecov upload is left on — it feeds the README badge.merge_group:added topull-request.yml, so a merge queue can be turned on after the transferwithout stranding every PR on a check that never starts.
publish-gatejob added, gated onchangeset-release/*. It diffs the tarball contents andruntime dependencies against the published version — the last reviewable point before a publish.
release.yml→cyberuni/.github/.github/workflows/pnpm-release-changeset-oidc.yml@mainwith anexplicit
permissions:block (id-token/contents/pull-requests: write) and nosecrets: inherit.grep -rn "unional/.github" .github/workflows/now returns nothing.Metadata
package.jsonrepository/homepage/bugs→cyberuni/assertron. The npm package namestays
assertron; the npm scope does not follow the GitHub org.cyberuni/assertron. The GitHub Actions badge pointed at anodejsworkflow thathas not existed for years, and the codecov badge at
branch/master; both are corrected. TheSemantic Release badge is replaced with a changesets one — this repo has released with changesets
for a long time.
Legacy files removed
.yarnrc.yml— setsyarnPath: .yarn/releases/yarn-3.6.1.cjs, and.yarn/releases/is not in therepo. Every CI run therefore prints a
MODULE_NOT_FOUNDstack trace during the reusableworkflow's environment-details step (which runs
yarn --version). It is non-fatal, but it looksexactly like a build failure and has already been mis-diagnosed as one.
.releaserc.json— semantic-release config left behind by the changesets migration. Nothing reads it.Changeset
A deliberate
patch. The change itself is repo-internal, but without a changeset the first releaseafter the transfer runs green and publishes nothing, so there is no way to prove OIDC publishing
works.
Pre-existing state, for the record
package.jsonversion11.5.2matcheslateston the registry. No placeholder version.mainwas green before this PR. The most recentpull-requestandreleaseruns onmainboth succeeded. A board note had this repo down as red with "
Cannot find module— an undeclareddependency"; that is a misread. The
Cannot find moduleline is the non-fatal.yarnrc.ymlwarning described above, printed on green runs too.
renovate/major-jest-monorepo, jest v30). Its actual failure is[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: unrs-resolver@1.12.2— that transitivedependency only appears in that branch's lockfile, not on
main. It is Renovate's PR to fix, notthis one; the fix there is to add
unrs-resolver: truetoallowBuildsinpnpm-workspace.yaml.scope: development— none reach consumers of the publishedpackage. Left for the toolchain/dependency phase.
Repo settings applied alongside this PR
mainruleset created (requirescode / all-checksand the CodeQL code-scanning rule;no
codecov/*contexts, norequired_linear_history), then the legacy branch protection removed —in that order, so
mainwas never unprotected.allow_update_branchon.default_workflow_permissionsstayswriteuntil this PR (which carries thepermissions:block)has landed. Lowering it first would
startup_failurethe next release with no logs.NPM_TOKEN/CI_GITHUB_TOKENare left in place until a publish has proven OIDC works.