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
19 changes: 6 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:

env:
node-version: 22.x
NPM_TOKEN: ""

jobs:
release:
Expand All @@ -21,7 +20,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6

# This also setups a .npmrc file to publish to npm
# No registry-url: actions/setup-node would inject a NODE_AUTH_TOKEN
# placeholder that makes npm skip OIDC and fall back to token auth.
# The registry defaults to https://registry.npmjs.org.
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v6
with:
Expand All @@ -36,15 +37,7 @@ jobs:
- name: Generate archive
run: yarn workspace @girs/gnome-shell pack

- name: Configure Yarn for npm publishing
run: |
yarn config set npmRegistryServer "https://registry.npmjs.org"
yarn config set npmAlwaysAuth true
yarn config set npmAuthToken "${NPM_TOKEN}"
- name: Publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish
run: yarn workspace @girs/gnome-shell npm publish --tolerate-republish --access public --tag ${{github.event.release.prerelease && 'next' || 'latest'}} --provenance
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PUBLISH_TAG: ${{ github.event.release.prerelease && 'next' || 'latest' }}
run: npm publish packages/gnome-shell --access public --provenance --tag "$PUBLISH_TAG"