From 8faa272440617d73cf09766cda40eac52001a884 Mon Sep 17 00:00:00 2001 From: Tom Kaminski Date: Sun, 17 Nov 2024 11:12:55 +0200 Subject: [PATCH] Fix react-sdk next version release (#850) ## Related Issues https://github.com/descope/etc/issues/8240 --------- Co-authored-by: tomski747 --- .github/workflows/release-next-react-sdk.yml | 23 ++++++++------------ 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release-next-react-sdk.yml b/.github/workflows/release-next-react-sdk.yml index 5e9b990bb..d1664b21c 100644 --- a/.github/workflows/release-next-react-sdk.yml +++ b/.github/workflows/release-next-react-sdk.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - fix/react-sdk-next env: NODE_VERSION: 18.10.0 @@ -15,23 +16,13 @@ jobs: name: Release Next runs-on: ubuntu-latest steps: - - name: Check if should run - id: 'check' - run: | - if [[ $(nx show projects --affected --plain | grep -q "react-sdk") ]]; then - echo "run=true" >> $GITHUB_OUTPUT - else - echo "run=false" >> $GITHUB_OUTPUT - fi - name: Get token - if: steps.check.outputs.run == 'true' id: get_token uses: tibdex/github-app-token@v2 with: private_key: ${{ secrets.RELEASE_APP_PEM }} app_id: ${{ secrets.RELEASE_APP_ID }} - name: Checkout code - if: steps.check.outputs.run == 'true' uses: actions/checkout@v4 with: fetch-depth: 0 @@ -39,26 +30,30 @@ jobs: token: ${{ steps.get_token.outputs.token }} ref: ${{ github.ref }} - name: Run git config - if: steps.check.outputs.run == 'true' run: | git config user.name github-actions git config user.email github-actions@github.com - name: Setup Node - if: steps.check.outputs.run == 'true' uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} registry-url: https://registry.npmjs.org/ - name: Setup PNPM - if: steps.check.outputs.run == 'true' uses: pnpm/action-setup@v4 with: version: ${{ env.PNPM_VERSION }} - name: Install dependencies - if: steps.check.outputs.run == 'true' run: pnpm install --frozen-lockfile --ignore-scripts env: CI: true + - name: Check if should run + id: 'check' + run: | + if $(npx nx show projects --affected --plain | grep -q "react-sdk"); then + echo "run=true" >> $GITHUB_OUTPUT + else + echo "run=false" >> $GITHUB_OUTPUT + fi - name: Build if: steps.check.outputs.run == 'true' run: npm run version:ci