From 9ada62b72e12a1c5b8cbfbd6b51b644a8166036f Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Mon, 21 Sep 2026 12:33:59 +0100 Subject: [PATCH] Fix nightly template publishing authentication --- .github/workflows/nightly.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 71fad1c..f361286 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -12,19 +12,23 @@ on: jobs: publish_template_as_nightly: runs-on: ubuntu-latest + environment: npm-publish + permissions: + # Required for npm trusted publishing (OIDC token exchange with the registry) + id-token: write + contents: read steps: - name: Checkout uses: actions/checkout@v4.1.1 - name: Setup node.js - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v6 with: - node-version: 22 + node-version: 'lts/*' registry-url: 'https://registry.npmjs.org' + package-manager-cache: false - name: Update versions to nightly run: node ./scripts/updateTemplateVersion.js nightly - name: Update template/package.json to nightly react-native + @react-native run: node ./scripts/updateReactNativeVersion.js nightly - name: Publish NPM as Nightly run: npm publish --tag nightly - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}