🚀 Release #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Entrypoint workflow for releasing JavaScript SDKs. | |
| # Jobs are arranged as a DAG matching the SDK dependency graph. | |
| # SDKs at the same dependency level run concurrently; push conflicts are | |
| # handled by a retry-with-rebase loop in the publish step. | |
| name: 🚀 Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| bump_type: | |
| description: 'Version bump type' | |
| required: true | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| default: patch | |
| confirm_major: | |
| description: 'Check to confirm intentional major bump (required when bump_type is major)' | |
| required: false | |
| type: boolean | |
| default: false | |
| sdk_browser: | |
| description: '@thunderid/browser' | |
| required: false | |
| type: boolean | |
| default: false | |
| sdk_express: | |
| description: '@thunderid/express' | |
| required: false | |
| type: boolean | |
| default: false | |
| sdk_javascript: | |
| description: '@thunderid/javascript' | |
| required: false | |
| type: boolean | |
| default: false | |
| sdk_nextjs: | |
| description: '@thunderid/nextjs' | |
| required: false | |
| type: boolean | |
| default: false | |
| sdk_node: | |
| description: '@thunderid/node' | |
| required: false | |
| type: boolean | |
| default: false | |
| sdk_nuxt: | |
| description: '@thunderid/nuxt' | |
| required: false | |
| type: boolean | |
| default: false | |
| sdk_react: | |
| description: '@thunderid/react' | |
| required: false | |
| type: boolean | |
| default: false | |
| sdk_react_router: | |
| description: '@thunderid/react-router' | |
| required: false | |
| type: boolean | |
| default: false | |
| sdk_tanstack_router: | |
| description: '@thunderid/tanstack-router' | |
| required: false | |
| type: boolean | |
| default: false | |
| sdk_vue: | |
| description: '@thunderid/vue' | |
| required: false | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: write | |
| # IMPORTANT: DO NOT REMOVE. `id-token` is required for OIDC publishing. | |
| id-token: write | |
| env: | |
| RELEASE_GIT_USER_NAME: "thunderid[bot]" | |
| RELEASE_GIT_USER_EMAIL: "thunderid[bot]@users.noreply.thunderid.dev" | |
| NODE_VERSION: "lts/*" | |
| jobs: | |
| validate: | |
| name: ✅ Validate Inputs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Guard against accidental major bump | |
| if: github.event.inputs.bump_type == 'major' && github.event.inputs.confirm_major != 'true' | |
| run: | | |
| echo "❌ bump_type is 'major' but confirm_major is not checked. Enable confirm_major to proceed." | |
| exit 1 | |
| # ── Level 0 ──────────────────────────────────────────────────────────────── | |
| release-javascript: | |
| name: 📜 Release @thunderid/javascript | |
| needs: [validate] | |
| if: needs.validate.result == 'success' && github.event.inputs.sdk_javascript == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout Code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| token: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| - name: 📦 Set up pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 | |
| with: | |
| version: latest | |
| - name: ⚙️ Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'pnpm' | |
| - name: 📦 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏷️ Bump Version | |
| id: bump | |
| run: | | |
| cd packages/javascript | |
| pnpm version ${{ github.event.inputs.bump_type }} --no-git-tag-version | |
| echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: 🔨 Build | |
| run: pnpm turbo run build --filter=@thunderid/javascript | |
| - name: 📤 Commit, Tag & Push | |
| run: | | |
| git config user.name "${{ env.RELEASE_GIT_USER_NAME }}" | |
| git config user.email "${{ env.RELEASE_GIT_USER_EMAIL }}" | |
| git add packages/javascript/package.json | |
| git diff --cached --quiet || git commit -m "[Release] @thunderid/javascript@${{ steps.bump.outputs.version }}" | |
| for i in $(seq 1 5); do | |
| git pull --rebase origin ${{ github.ref_name }} | |
| git push origin HEAD:${{ github.ref_name }} && break | |
| [ "$i" -eq 5 ] && exit 1 | |
| sleep $((i * 3)) | |
| done | |
| git tag "sdk/javascript/v${{ steps.bump.outputs.version }}" | |
| git push origin "sdk/javascript/v${{ steps.bump.outputs.version }}" | |
| - name: 📦 Publish to npm | |
| run: pnpm publish --no-git-checks --access public --provenance | |
| working-directory: packages/javascript | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: 🚀 Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| run: | | |
| gh release create "sdk/javascript/v${{ steps.bump.outputs.version }}" \ | |
| --title "ThunderID JavaScript SDK v${{ steps.bump.outputs.version }}" \ | |
| --generate-notes | |
| # ── Level 1: depends on javascript ───────────────────────────────────────── | |
| release-browser: | |
| name: 🌐 Release @thunderid/browser | |
| needs: [validate, release-javascript] | |
| if: ${{ always() && needs.validate.result == 'success' && (needs.release-javascript.result == 'success' || needs.release-javascript.result == 'skipped') && github.event.inputs.sdk_browser == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout Code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| token: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| - name: 📦 Set up pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 | |
| with: | |
| version: latest | |
| - name: ⚙️ Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'pnpm' | |
| - name: 📦 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏷️ Bump Version | |
| id: bump | |
| run: | | |
| cd packages/browser | |
| pnpm version ${{ github.event.inputs.bump_type }} --no-git-tag-version | |
| echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: 🔨 Build | |
| run: pnpm turbo run build --filter=@thunderid/browser | |
| - name: 📤 Commit, Tag & Push | |
| run: | | |
| git config user.name "${{ env.RELEASE_GIT_USER_NAME }}" | |
| git config user.email "${{ env.RELEASE_GIT_USER_EMAIL }}" | |
| git add packages/browser/package.json | |
| git diff --cached --quiet || git commit -m "[Release] @thunderid/browser@${{ steps.bump.outputs.version }}" | |
| for i in $(seq 1 5); do | |
| git pull --rebase origin ${{ github.ref_name }} | |
| git push origin HEAD:${{ github.ref_name }} && break | |
| [ "$i" -eq 5 ] && exit 1 | |
| sleep $((i * 3)) | |
| done | |
| git tag "sdk/browser/v${{ steps.bump.outputs.version }}" | |
| git push origin "sdk/browser/v${{ steps.bump.outputs.version }}" | |
| - name: 📦 Publish to npm | |
| run: pnpm publish --no-git-checks --access public --provenance | |
| working-directory: packages/browser | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: 📦 Pack Sample | |
| id: pack | |
| uses: ./.github/actions/pack-sample | |
| with: | |
| sdk: browser | |
| version: ${{ steps.bump.outputs.version }} | |
| - name: 🚀 Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| run: | | |
| gh release create "sdk/browser/v${{ steps.bump.outputs.version }}" \ | |
| --title "ThunderID Browser SDK v${{ steps.bump.outputs.version }}" \ | |
| --generate-notes \ | |
| "${{ steps.pack.outputs.archive }}" | |
| release-node: | |
| name: 🟢 Release @thunderid/node | |
| needs: [validate, release-javascript] | |
| if: ${{ always() && needs.validate.result == 'success' && (needs.release-javascript.result == 'success' || needs.release-javascript.result == 'skipped') && github.event.inputs.sdk_node == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout Code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| token: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| - name: 📦 Set up pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 | |
| with: | |
| version: latest | |
| - name: ⚙️ Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'pnpm' | |
| - name: 📦 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏷️ Bump Version | |
| id: bump | |
| run: | | |
| cd packages/node | |
| pnpm version ${{ github.event.inputs.bump_type }} --no-git-tag-version | |
| echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: 🔨 Build | |
| run: pnpm turbo run build --filter=@thunderid/node | |
| - name: 📤 Commit, Tag & Push | |
| run: | | |
| git config user.name "${{ env.RELEASE_GIT_USER_NAME }}" | |
| git config user.email "${{ env.RELEASE_GIT_USER_EMAIL }}" | |
| git add packages/node/package.json | |
| git diff --cached --quiet || git commit -m "[Release] @thunderid/node@${{ steps.bump.outputs.version }}" | |
| for i in $(seq 1 5); do | |
| git pull --rebase origin ${{ github.ref_name }} | |
| git push origin HEAD:${{ github.ref_name }} && break | |
| [ "$i" -eq 5 ] && exit 1 | |
| sleep $((i * 3)) | |
| done | |
| git tag "sdk/node/v${{ steps.bump.outputs.version }}" | |
| git push origin "sdk/node/v${{ steps.bump.outputs.version }}" | |
| - name: 📦 Publish to npm | |
| run: pnpm publish --no-git-checks --access public --provenance | |
| working-directory: packages/node | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: 🚀 Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| run: | | |
| gh release create "sdk/node/v${{ steps.bump.outputs.version }}" \ | |
| --title "ThunderID Node SDK v${{ steps.bump.outputs.version }}" \ | |
| --generate-notes | |
| # ── Level 2: depends on browser / node ───────────────────────────────────── | |
| release-express: | |
| name: 🚂 Release @thunderid/express | |
| needs: [validate, release-node] | |
| if: ${{ always() && needs.validate.result == 'success' && (needs.release-node.result == 'success' || needs.release-node.result == 'skipped') && github.event.inputs.sdk_express == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout Code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| token: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| - name: 📦 Set up pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 | |
| with: | |
| version: latest | |
| - name: ⚙️ Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'pnpm' | |
| - name: 📦 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏷️ Bump Version | |
| id: bump | |
| run: | | |
| cd packages/express | |
| pnpm version ${{ github.event.inputs.bump_type }} --no-git-tag-version | |
| echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: 🔨 Build | |
| run: pnpm turbo run build --filter=@thunderid/express | |
| - name: 📤 Commit, Tag & Push | |
| run: | | |
| git config user.name "${{ env.RELEASE_GIT_USER_NAME }}" | |
| git config user.email "${{ env.RELEASE_GIT_USER_EMAIL }}" | |
| git add packages/express/package.json | |
| git diff --cached --quiet || git commit -m "[Release] @thunderid/express@${{ steps.bump.outputs.version }}" | |
| for i in $(seq 1 5); do | |
| git pull --rebase origin ${{ github.ref_name }} | |
| git push origin HEAD:${{ github.ref_name }} && break | |
| [ "$i" -eq 5 ] && exit 1 | |
| sleep $((i * 3)) | |
| done | |
| git tag "sdk/express/v${{ steps.bump.outputs.version }}" | |
| git push origin "sdk/express/v${{ steps.bump.outputs.version }}" | |
| - name: 📦 Publish to npm | |
| run: pnpm publish --no-git-checks --access public --provenance | |
| working-directory: packages/express | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: 📦 Pack Sample | |
| id: pack | |
| uses: ./.github/actions/pack-sample | |
| with: | |
| sdk: express | |
| version: ${{ steps.bump.outputs.version }} | |
| - name: 🚀 Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| run: | | |
| gh release create "sdk/express/v${{ steps.bump.outputs.version }}" \ | |
| --title "ThunderID Express SDK v${{ steps.bump.outputs.version }}" \ | |
| --generate-notes \ | |
| "${{ steps.pack.outputs.archive }}" | |
| release-react: | |
| name: ⚛️ Release @thunderid/react | |
| needs: [validate, release-browser] | |
| if: ${{ always() && needs.validate.result == 'success' && (needs.release-browser.result == 'success' || needs.release-browser.result == 'skipped') && github.event.inputs.sdk_react == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout Code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| token: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| - name: 📦 Set up pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 | |
| with: | |
| version: latest | |
| - name: ⚙️ Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'pnpm' | |
| - name: 📦 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏷️ Bump Version | |
| id: bump | |
| run: | | |
| cd packages/react | |
| pnpm version ${{ github.event.inputs.bump_type }} --no-git-tag-version | |
| echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: 🔨 Build | |
| run: pnpm turbo run build --filter=@thunderid/react | |
| - name: 📤 Commit, Tag & Push | |
| run: | | |
| git config user.name "${{ env.RELEASE_GIT_USER_NAME }}" | |
| git config user.email "${{ env.RELEASE_GIT_USER_EMAIL }}" | |
| git add packages/react/package.json | |
| git diff --cached --quiet || git commit -m "[Release] @thunderid/react@${{ steps.bump.outputs.version }}" | |
| for i in $(seq 1 5); do | |
| git pull --rebase origin ${{ github.ref_name }} | |
| git push origin HEAD:${{ github.ref_name }} && break | |
| [ "$i" -eq 5 ] && exit 1 | |
| sleep $((i * 3)) | |
| done | |
| git tag "sdk/react/v${{ steps.bump.outputs.version }}" | |
| git push origin "sdk/react/v${{ steps.bump.outputs.version }}" | |
| - name: 📦 Publish to npm | |
| run: pnpm publish --no-git-checks --access public --provenance | |
| working-directory: packages/react | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: 📦 Pack Sample | |
| id: pack | |
| uses: ./.github/actions/pack-sample | |
| with: | |
| sdk: react | |
| version: ${{ steps.bump.outputs.version }} | |
| - name: 🚀 Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| run: | | |
| gh release create "sdk/react/v${{ steps.bump.outputs.version }}" \ | |
| --title "ThunderID React SDK v${{ steps.bump.outputs.version }}" \ | |
| --generate-notes \ | |
| "${{ steps.pack.outputs.archive }}" | |
| release-vue: | |
| name: 🟩 Release @thunderid/vue | |
| needs: [validate, release-browser] | |
| if: ${{ always() && needs.validate.result == 'success' && (needs.release-browser.result == 'success' || needs.release-browser.result == 'skipped') && github.event.inputs.sdk_vue == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout Code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| token: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| - name: 📦 Set up pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 | |
| with: | |
| version: latest | |
| - name: ⚙️ Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'pnpm' | |
| - name: 📦 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏷️ Bump Version | |
| id: bump | |
| run: | | |
| cd packages/vue | |
| pnpm version ${{ github.event.inputs.bump_type }} --no-git-tag-version | |
| echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: 🔨 Build | |
| run: pnpm turbo run build --filter=@thunderid/vue | |
| - name: 📤 Commit, Tag & Push | |
| run: | | |
| git config user.name "${{ env.RELEASE_GIT_USER_NAME }}" | |
| git config user.email "${{ env.RELEASE_GIT_USER_EMAIL }}" | |
| git add packages/vue/package.json | |
| git diff --cached --quiet || git commit -m "[Release] @thunderid/vue@${{ steps.bump.outputs.version }}" | |
| for i in $(seq 1 5); do | |
| git pull --rebase origin ${{ github.ref_name }} | |
| git push origin HEAD:${{ github.ref_name }} && break | |
| [ "$i" -eq 5 ] && exit 1 | |
| sleep $((i * 3)) | |
| done | |
| git tag "sdk/vue/v${{ steps.bump.outputs.version }}" | |
| git push origin "sdk/vue/v${{ steps.bump.outputs.version }}" | |
| - name: 📦 Publish to npm | |
| run: pnpm publish --no-git-checks --access public --provenance | |
| working-directory: packages/vue | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: 📦 Pack Sample | |
| id: pack | |
| uses: ./.github/actions/pack-sample | |
| with: | |
| sdk: vue | |
| version: ${{ steps.bump.outputs.version }} | |
| - name: 🚀 Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| run: | | |
| gh release create "sdk/vue/v${{ steps.bump.outputs.version }}" \ | |
| --title "ThunderID Vue SDK v${{ steps.bump.outputs.version }}" \ | |
| --generate-notes \ | |
| "${{ steps.pack.outputs.archive }}" | |
| # ── Level 3: depends on react / node+react / browser+node+vue ────────────── | |
| release-react-router: | |
| name: 🔀 Release @thunderid/react-router | |
| needs: [validate, release-react] | |
| if: ${{ always() && needs.validate.result == 'success' && (needs.release-react.result == 'success' || needs.release-react.result == 'skipped') && github.event.inputs.sdk_react_router == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout Code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| token: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| - name: 📦 Set up pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 | |
| with: | |
| version: latest | |
| - name: ⚙️ Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'pnpm' | |
| - name: 📦 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏷️ Bump Version | |
| id: bump | |
| run: | | |
| cd packages/react-router | |
| pnpm version ${{ github.event.inputs.bump_type }} --no-git-tag-version | |
| echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: 🔨 Build | |
| run: pnpm turbo run build --filter=@thunderid/react-router | |
| - name: 📤 Commit, Tag & Push | |
| run: | | |
| git config user.name "${{ env.RELEASE_GIT_USER_NAME }}" | |
| git config user.email "${{ env.RELEASE_GIT_USER_EMAIL }}" | |
| git add packages/react-router/package.json | |
| git diff --cached --quiet || git commit -m "[Release] @thunderid/react-router@${{ steps.bump.outputs.version }}" | |
| for i in $(seq 1 5); do | |
| git pull --rebase origin ${{ github.ref_name }} | |
| git push origin HEAD:${{ github.ref_name }} && break | |
| [ "$i" -eq 5 ] && exit 1 | |
| sleep $((i * 3)) | |
| done | |
| git tag "sdk/react-router/v${{ steps.bump.outputs.version }}" | |
| git push origin "sdk/react-router/v${{ steps.bump.outputs.version }}" | |
| - name: 📦 Publish to npm | |
| run: pnpm publish --no-git-checks --access public --provenance | |
| working-directory: packages/react-router | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: 🚀 Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| run: | | |
| gh release create "sdk/react-router/v${{ steps.bump.outputs.version }}" \ | |
| --title "ThunderID React Router SDK v${{ steps.bump.outputs.version }}" \ | |
| --generate-notes | |
| release-tanstack-router: | |
| name: 🔱 Release @thunderid/tanstack-router | |
| needs: [validate, release-react] | |
| if: ${{ always() && needs.validate.result == 'success' && (needs.release-react.result == 'success' || needs.release-react.result == 'skipped') && github.event.inputs.sdk_tanstack_router == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout Code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| token: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| - name: 📦 Set up pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 | |
| with: | |
| version: latest | |
| - name: ⚙️ Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'pnpm' | |
| - name: 📦 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏷️ Bump Version | |
| id: bump | |
| run: | | |
| cd packages/tanstack-router | |
| pnpm version ${{ github.event.inputs.bump_type }} --no-git-tag-version | |
| echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: 🔨 Build | |
| run: pnpm turbo run build --filter=@thunderid/tanstack-router | |
| - name: 📤 Commit, Tag & Push | |
| run: | | |
| git config user.name "${{ env.RELEASE_GIT_USER_NAME }}" | |
| git config user.email "${{ env.RELEASE_GIT_USER_EMAIL }}" | |
| git add packages/tanstack-router/package.json | |
| git diff --cached --quiet || git commit -m "[Release] @thunderid/tanstack-router@${{ steps.bump.outputs.version }}" | |
| for i in $(seq 1 5); do | |
| git pull --rebase origin ${{ github.ref_name }} | |
| git push origin HEAD:${{ github.ref_name }} && break | |
| [ "$i" -eq 5 ] && exit 1 | |
| sleep $((i * 3)) | |
| done | |
| git tag "sdk/tanstack-router/v${{ steps.bump.outputs.version }}" | |
| git push origin "sdk/tanstack-router/v${{ steps.bump.outputs.version }}" | |
| - name: 📦 Publish to npm | |
| run: pnpm publish --no-git-checks --access public --provenance | |
| working-directory: packages/tanstack-router | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: 🚀 Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| run: | | |
| gh release create "sdk/tanstack-router/v${{ steps.bump.outputs.version }}" \ | |
| --title "ThunderID TanStack Router SDK v${{ steps.bump.outputs.version }}" \ | |
| --generate-notes | |
| release-nextjs: | |
| name: ▲ Release @thunderid/nextjs | |
| needs: [validate, release-node, release-react] | |
| if: ${{ always() && needs.validate.result == 'success' && (needs.release-node.result == 'success' || needs.release-node.result == 'skipped') && (needs.release-react.result == 'success' || needs.release-react.result == 'skipped') && github.event.inputs.sdk_nextjs == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout Code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| token: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| - name: 📦 Set up pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 | |
| with: | |
| version: latest | |
| - name: ⚙️ Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'pnpm' | |
| - name: 📦 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏷️ Bump Version | |
| id: bump | |
| run: | | |
| cd packages/nextjs | |
| pnpm version ${{ github.event.inputs.bump_type }} --no-git-tag-version | |
| echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: 🔨 Build | |
| run: pnpm turbo run build --filter=@thunderid/nextjs | |
| - name: 📤 Commit, Tag & Push | |
| run: | | |
| git config user.name "${{ env.RELEASE_GIT_USER_NAME }}" | |
| git config user.email "${{ env.RELEASE_GIT_USER_EMAIL }}" | |
| git add packages/nextjs/package.json | |
| git diff --cached --quiet || git commit -m "[Release] @thunderid/nextjs@${{ steps.bump.outputs.version }}" | |
| for i in $(seq 1 5); do | |
| git pull --rebase origin ${{ github.ref_name }} | |
| git push origin HEAD:${{ github.ref_name }} && break | |
| [ "$i" -eq 5 ] && exit 1 | |
| sleep $((i * 3)) | |
| done | |
| git tag "sdk/nextjs/v${{ steps.bump.outputs.version }}" | |
| git push origin "sdk/nextjs/v${{ steps.bump.outputs.version }}" | |
| - name: 📦 Publish to npm | |
| run: pnpm publish --no-git-checks --access public --provenance | |
| working-directory: packages/nextjs | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: 📦 Pack Sample | |
| id: pack | |
| uses: ./.github/actions/pack-sample | |
| with: | |
| sdk: nextjs | |
| version: ${{ steps.bump.outputs.version }} | |
| - name: 🚀 Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| run: | | |
| gh release create "sdk/nextjs/v${{ steps.bump.outputs.version }}" \ | |
| --title "ThunderID Next.js SDK v${{ steps.bump.outputs.version }}" \ | |
| --generate-notes \ | |
| "${{ steps.pack.outputs.archive }}" | |
| release-nuxt: | |
| name: 💚 Release @thunderid/nuxt | |
| needs: [validate, release-browser, release-node, release-vue] | |
| if: ${{ always() && needs.validate.result == 'success' && (needs.release-browser.result == 'success' || needs.release-browser.result == 'skipped') && (needs.release-node.result == 'success' || needs.release-node.result == 'skipped') && (needs.release-vue.result == 'success' || needs.release-vue.result == 'skipped') && github.event.inputs.sdk_nuxt == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout Code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| token: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| - name: 📦 Set up pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 | |
| with: | |
| version: latest | |
| - name: ⚙️ Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'pnpm' | |
| - name: 📦 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏷️ Bump Version | |
| id: bump | |
| run: | | |
| cd packages/nuxt | |
| pnpm version ${{ github.event.inputs.bump_type }} --no-git-tag-version | |
| echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: 🔨 Build | |
| run: pnpm turbo run build --filter=@thunderid/nuxt | |
| - name: 📤 Commit, Tag & Push | |
| run: | | |
| git config user.name "${{ env.RELEASE_GIT_USER_NAME }}" | |
| git config user.email "${{ env.RELEASE_GIT_USER_EMAIL }}" | |
| git add packages/nuxt/package.json | |
| git diff --cached --quiet || git commit -m "[Release] @thunderid/nuxt@${{ steps.bump.outputs.version }}" | |
| for i in $(seq 1 5); do | |
| git pull --rebase origin ${{ github.ref_name }} | |
| git push origin HEAD:${{ github.ref_name }} && break | |
| [ "$i" -eq 5 ] && exit 1 | |
| sleep $((i * 3)) | |
| done | |
| git tag "sdk/nuxt/v${{ steps.bump.outputs.version }}" | |
| git push origin "sdk/nuxt/v${{ steps.bump.outputs.version }}" | |
| - name: 📦 Publish to npm | |
| run: pnpm publish --no-git-checks --access public --provenance | |
| working-directory: packages/nuxt | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: 📦 Pack Sample | |
| id: pack | |
| uses: ./.github/actions/pack-sample | |
| with: | |
| sdk: nuxt | |
| version: ${{ steps.bump.outputs.version }} | |
| - name: 🚀 Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.THUNDERID_AUTOMATION_BOT }} | |
| run: | | |
| gh release create "sdk/nuxt/v${{ steps.bump.outputs.version }}" \ | |
| --title "ThunderID Nuxt SDK v${{ steps.bump.outputs.version }}" \ | |
| --generate-notes \ | |
| "${{ steps.pack.outputs.archive }}" |