Skip to content

ci: record releases in Linear, pin and update workflow actions - #18

Merged
gorandodig merged 4 commits into
mainfrom
ci/linear-releases
Aug 28, 2026
Merged

ci: record releases in Linear, pin and update workflow actions#18
gorandodig merged 4 commits into
mainfrom
ci/linear-releases

Conversation

@gorandodig

Copy link
Copy Markdown
Member

Records each npm release in Linear.

  • sync runs in the publish job after npm publish. The release is identified by the tag.
  • publish.yml is SHA-pinned
  • Added .github/dependabot.yml for github-actions, so the SHA pins stay patched.
  • The publish job's checkout now has fetch-depth: 0 so scan range <previous release>..HEAD is possible
  • Bumped checkout v7 and setup-node v7.

@gorandodig
gorandodig requested a review from zanjonke August 25, 2026 07:07

@zanjonke zanjonke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall looks good. Left 2 minor comments. I can also the LINEAR_ACCESS_KEY into the repo secrets once we merge this.

Comment thread .github/workflows/publish.yml Outdated
Comment on lines +127 to +134
# Non-fatal: the package is already on npm.
- name: Record release in Linear
continue-on-error: true
uses: linear/linear-release-action@0a25abab892a91062ebf42260dbb2ce6277aa205 # v0.16.0
with:
access_key: ${{ secrets.LINEAR_ACCESS_KEY }}
version: ${{ github.event.release.tag_name }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it would be better if this is a dedicated job rather than a step with publish. The publishjob has OIDC access that linear doesnt need. Less risk of things going out of hand.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed, done in e7e5697. It runs with contents: read and no OIDC.

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +27 to +28
- uses: actions/checkout@v7
- uses: actions/setup-node@v7

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For consistency sake it would be better that we use the same pinned SHA as in the publish.yml.

Copy link
Copy Markdown
Member Author

Both addressed. I've already added the LINEAR_ACCESS_KEY secret for the pipeline, thanks!

@gorandodig
gorandodig requested a review from zanjonke August 25, 2026 14:59

@zanjonke zanjonke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🚀

sync runs in the publish job after npm publish and before the Slack
notification. Non-fatal: the package is already published, so a failure
there cannot turn a green publish red. The release is identified by the tag.

The publish checkout was shallow; the scan range needs full history.

publish.yml is SHA-pinned; it holds id-token: write for trusted publishing.
ci.yml stays on tags. Bumped checkout v7 and setup-node v7.

Dependabot added for github-actions so the SHA pins stay patched.
The publish job holds id-token: write for trusted publishing. Recording a
release needs none of it, so it runs in a job with contents: read.

The publish job's checkout drops fetch-depth: 0 with it — that was there only
for the release scan, which now happens elsewhere.

A failure was also invisible: the step is non-fatal by design, so the job stayed
green and nothing was logged. It now posts to Slack on the step's own outcome,
since failure() never fires when continue-on-error swallows the error. The CLI
the action downloads is pinned too, not just the action.
CI and the publish path were running different versions of the same actions, so
a bad release would surface in a publish rather than in a pull request.
Commented out rather than removed, so re-enabling is a straight uncomment.
@gorandodig
gorandodig merged commit 57aad7d into main Aug 28, 2026
3 checks passed
@gorandodig
gorandodig deleted the ci/linear-releases branch August 28, 2026 15:33
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