From e09034da19df320828e961326b2a8574302fe7fb Mon Sep 17 00:00:00 2001 From: ThibaultBee <37510686+ThibaultBee@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:26:33 +0100 Subject: [PATCH] fix(ci): fix release workflow --- .github/workflows/release.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74e6143..ea79e21 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,17 +1,29 @@ -name: Release React Native Live Stream package +name: Publish package to npmjs + on: release: types: [published] + jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 with: - registry-url: 'https://registry.npmjs.org' - - run: yarn - - name: Publish to npm - run: yarn publish + node-version: 18 + registry-url: "https://registry.npmjs.org" + cache: 'yarn' + + - name: Prepare NPM credentials + run: | + echo "npmAuthToken: ${NODE_AUTH_TOKEN}" >> .yarnrc.yml env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - run: yarn + + - name: Publish to npm + run: yarn npm publish --access public \ No newline at end of file