Skip to content

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

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

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

Conversation

@gorandodig

Copy link
Copy Markdown
Member

Records each PyPI release in Linear and puts the workflow actions on one pinning
policy.

  • New linear-release job on a successful publish. The release is identified by the tag, not a commit hash.
  • publish-to-pypi.yml is SHA-pinned.
  • Bumped checkout v7, setup-python v7, cache v6, upload-artifact v7, download-artifact v8.
  • Slack action v1.24.0 to v4.0.0.
  • Codecov v3 disabled. Coverage is still computed and printed.
  • Dependabot now covers github-actions alongside pip, so the SHA pins stay patched.

A linear-release job records each PyPI release, gated on a successful
publish. It is a separate job because the publish job has no checkout and
holds only id-token: write for Trusted Publishing. The release is identified
by the tag.

publish-to-pypi.yml is SHA-pinned. pypa/gh-action-pypi-publish was on the
release/v1 branch ref, which moves on every push, next to the PyPI OIDC
token. Other workflows stay on tags. Bumped checkout v7, setup-python v7,
cache v6, upload-artifact v7, download-artifact v8.

Slack action v4.0.0 needs webhook-type from v2 on. The e2e notification now
passes the job's own webhook secret rather than the default one.

Codecov v3 disabled: its Node runtime is gone from the runners. Coverage is
still computed and printed.

Dependabot now covers github-actions alongside pip.
@gorandodig
gorandodig requested a review from zanjonke August 25, 2026 07:07

@zanjonke zanjonke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall looks good. Left some minor comments and questions.

Comment thread .github/workflows/publish-to-pypi.yml Outdated
uses: linear/linear-release-action@0a25abab892a91062ebf42260dbb2ce6277aa205 # v0.16.0
with:
access_key: ${{ secrets.LINEAR_ACCESS_KEY }}
version: ${{ github.ref_name }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this step fails nothing will get logged anywhere. For the publish-to-pypi we have a dedicated SLACK webhook.

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.

Good catch, fixed in ea1d37a.


steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as in plain-forge repo - I think it would be better to stay consistent with pins so as to avoid any discrepancies and catch issues early rather than in the deploy job.

This applies also to all other un-pinned actions.

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, and done.

Comment thread .github/workflows/publish-to-pypi.yml Outdated
# Non-fatal: the package is already published.
- name: Record release in Linear
continue-on-error: true
uses: linear/linear-release-action@0a25abab892a91062ebf42260dbb2ce6277aa205 # v0.16.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just leaving a note here. This SHA pins the install script that downloads the binary which is then the linear CLI and not the CLI itself. Which only half solves the security issues.

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.

Correct. Pinning the action fixes the code that runs, not the binary it downloads at runtime. CLI pinned to version tag now.

The step is non-fatal by design, which also meant a failure was invisible: the
job stayed green and nothing was logged. It now checks the step's own outcome,
since failure() never fires when continue-on-error swallows the error.

Also pins the CLI version the action downloads. Pinning the action alone still
left the binary it fetches floating.
Previously only the workflows holding id-token: write were pinned, on the
grounds that the rest had a smaller blast radius. That left CI and the publish
path running different versions of the same actions, so a bad release would
surface in a deploy rather than in a pull request.

Pinning everything makes the version CI exercises the version that publishes.
Dependabot moves them together.

Copy link
Copy Markdown
Member Author

Thanks! All three addressed, please take another look.

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

@zanjonke zanjonke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

Commented out rather than removed, so re-enabling is a straight uncomment.
@gorandodig
gorandodig merged commit f3a1344 into main Aug 28, 2026
12 checks passed
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