Skip to content

Commit

Permalink
only run if react sdk change
Browse files Browse the repository at this point in the history
  • Loading branch information
Bars92 committed Sep 12, 2024
1 parent c4c18fe commit 4c8a1c2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/release-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,23 @@ 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
Expand All @@ -39,15 +49,18 @@ jobs:
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: Build
if: steps.check.outputs.run == 'true'
run: npm run version:ci
env:
CI: true
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
- name: Run pnpm publish
if: steps.check.outputs.run == 'true'
run: |
pnpm --filter "@descope/react-sdk" exec npm version "0.0.0-next-$(git rev-parse HEAD)" --git-tag-version=false
pnpm --filter "@descope/react-sdk" publish --access=public --no-git-checks --tag=next
Expand Down

0 comments on commit 4c8a1c2

Please sign in to comment.