You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Npm and pypi support trusted publishing (and probably cargo as well), which is easier to setup and safer than access tokens. I experimented a bit and this does not seem to work with reusable workflows. Is support for this on your agenda?
Reacted by Nick Asmodeus, Matouš Dzivjak, Ole Herman Schumacher Elgesem, Jonathan Wilbur and Stephan Seitz
Try #54. I have no idea if/how you can set up a reusable workflow on the registry side.
jobs:
# may or may not worknpm:
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@trusted-publishing# may or may not workcrates:
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@trusted-publishing# definitely doesn't workpypi:
uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@trusted-publishing
Without the auth token this is bound to fail. Not sure how to fix it. Right now, I would have to copy your workflow and adjust it manually to use with trusted publishing.
Activity
ObserverOfTime commentedon Oct 30, 2025
We've been looking into it.
rkaminsk commentedon Dec 3, 2025
With classic tokens to stop working soon, this becomes more of an issue: https://github.com/orgs/community/discussions/178140. At least for npm.
ObserverOfTime commentedon Dec 14, 2025
Try #54. I have no idea if/how you can set up a reusable workflow on the registry side.
rkaminsk commentedon Dec 14, 2025
Thanks, I'll give it a shot when the next release is due.
rkaminsk commentedon Jan 13, 2026
I tried and it does not work. It seems like the reusable workflow does not receive githubs auth token:
If I run
npm publishdirectly in my workflow I get:If
npm publishis run via the reusable workflow there is no auth token and the process fails:Without the auth token this is bound to fail. Not sure how to fix it. Right now, I would have to copy your workflow and adjust it manually to use with trusted publishing.
sh-cho commentedon May 26, 2026
I believe we can't use trusted publishing when using reusable workflows for the moment, at least in npm/pypi.
Don't know about crates.io but haven't seen use-case