v8.0.8 #432
Workflow file for this run
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
| name: Publish stable Package to npmjs | |
| on: | |
| release: | |
| types: [created] | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: read | |
| jobs: | |
| release-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: npm install | |
| - run: node ./scripts/stableReleaseCheck.js | |
| run-test-cases: | |
| needs: release-check | |
| uses: ./.github/workflows/call_test_cases.yml | |
| publish-package-npm: | |
| needs: | |
| - release-check | |
| - run-test-cases | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24.x' # Node 24+ required for full OIDC support | |
| registry-url: 'https://registry.npmjs.org' | |
| # When trusted publishing is configured, npm automatically uses OIDC | |
| - name: Install NPM package | |
| run: npm install | |
| - name: get version | |
| id: fdk-cli-version | |
| uses: martinbeentjes/npm-get-version-action@v1.3.1 | |
| - name: Build the project | |
| run: npm run build | |
| - name: Installing sentry | |
| run: npm i -g @sentry/cli@2.28.6 | |
| - name: Add Debug Id to dist | |
| run: sentry-cli sourcemaps inject --org ${{ env.SENTRY_ORG }} --project ${{ env.SENTRY_PROJECT }} ./dist | |
| env: | |
| SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
| SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
| - name: create sentry.io release | |
| uses: getsentry/action-release@v1 | |
| env: | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
| SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
| with: | |
| environment: production | |
| sourcemaps: './dist' | |
| version: ${{ steps.fdk-cli-version.outputs.current-version }} | |
| ignore_missing: true | |
| # # Alternative of above to try in local | |
| # - name: Upload source map to Sentry | |
| # run: sentry-cli sourcemaps upload --org ${{ env.SENTRY_ORG }} --project ${{ env.SENTRY_PROJECT }} --release ${{ env.RELEASE_VERSION }} --auth-token ${{ env.SENTRY_AUTH_TOKEN }} ./dist | |
| # env: | |
| # SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| # SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
| # SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
| # RELEASE_VERSION: ${{ steps.fdk-cli-version.outputs.current-version }} | |
| - name: Adding Sentry DSN | |
| run: | | |
| echo "{\"dsn\": \"${{ secrets.SENTRY_DSN }}\"}" > ./dist/sentry.json | |
| - name: Delete SourceMap files | |
| run: find ./dist -type f -name '*.map' -exec rm -f {} \; | |
| - name: Publish to npmjs | |
| run: npm publish --access public |