Update release workflows for trusted publishing - #1126
Conversation
|
| env: | ||
| CI: true |
There was a problem hiding this comment.
This has been a default since 2020, so I removed it.
|
|
||
| - name: resolve pr refs | ||
| id: refs | ||
| uses: eficode/resolve-pr-refs@f7e14e739786aae2053e162c678cd4c3c2edaa83 # v0.0.4 |
There was a problem hiding this comment.
We were using this not even pinned to a version just @main which is a bit scary. v0.0.4 was released a while ago, and all the unreleased changes since are Dependabot updates which don’t seem to have ever made it to the dist, so this pin should be equivalent to what we were previously doing.
| pnpm run release --tag next--${{ steps.getSnapshotName.outputs.result }} > publish.output.txt 2>&1 | ||
| echo ::set-output name=result::`cat publish.output.txt` | ||
| env: | ||
| NPM_TOKEN: "" # See https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868 |
There was a problem hiding this comment.
The previous snapshot release workflow also set NODE_AUTH_TOKEN here and specified a registry-url in the setup-node step. I’ve never seen that before, but IIUC this step is the same as any other changeset publish, so I removed that and applied the same approach we do everywhere else for trusted publishing.
HiDeoo
left a comment
There was a problem hiding this comment.
Mostly reviewed the trusted publishing related changes as I'm less familiar with the snapshot release process and it's mostly just moved between workflows.
All the changes makes sense to me and looks correct.
I’m not 100% certain if the permissions I’ve given the snapshot release job are sufficient for its step posting a PR comment.
I think this should be fine as for repository permissions for "Pull requests", the /repos/{owner}/{repo}/issues/{issue_number}/comments endpoint to create a comment says to have at least one of the following permission sets:
"Issues" repository permissions (write)
"Pull requests" repository permissions (write)
| run: pnpm run build:all | ||
|
|
||
| - name: Bump Package Versions | ||
| id: changesets |
There was a problem hiding this comment.
Tiny nit: I don't think we need/use this id?
There was a problem hiding this comment.
Ah well spotted. Same in both jobs. Will remove.
There was a problem hiding this comment.
Done in 2f229a5
(Well… it will be once I’m able to push again 😅 see https://www.githubstatus.com/incidents/5q7nmlxz30sk)
Changes
Todo:
release.ymlinwithastro/compilerTesting
Hard to test tbh.
Docs
n/a