Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ concurrency:
jobs:
npm:
runs-on: ubuntu-latest
environment: release
permissions:
# Required so GitHub can issue an OIDC token for trusted publishing.
id-token: write
env:
TAG: ${{ inputs.version || github.ref_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_ENVIRONMENT: "production"

steps:
Expand All @@ -37,6 +40,7 @@ jobs:
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
with:
node-version-file: .node-version
registry-url: "https://registry.npmjs.org"

- uses: robinraju/release-downloader@28fc21f50d76778e7023361aa1f863e717d3d56f # v1.13
with:
Expand All @@ -47,7 +51,6 @@ jobs:

- run: tar -xzf release-npm-package/package.tar.gz
- run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nice

pushd release
npm publish --tag latest --access public

Expand Down Expand Up @@ -103,7 +106,6 @@ jobs:
# repo:coder/code-server:environment:release.
environment: release
permissions:
contents: read
# Required so GitHub can issue an OIDC token for the Docker Hub login.
id-token: write
# Required to push images to ghcr.io.
Expand Down
Loading