v0.17.0 #37
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: Release | |
| on: | |
| push: | |
| branches: | |
| - v0.x | |
| jobs: | |
| build-test-wasm: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| crate: | |
| - library_config | |
| - datadog-js-zstd | |
| - pipeline | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: 'Use composite action' | |
| uses: ./.github/actions/build-test-wasm | |
| with: | |
| crate: '${{ matrix.crate }}' | |
| build: | |
| uses: Datadog/action-prebuildify/.github/workflows/build.yml@main | |
| needs: build-test-wasm | |
| with: | |
| package-manager: 'yarn' | |
| cache: false | |
| min-node-version: 18 | |
| rust: true | |
| only: darwin-arm64,darwin-x64,linux-arm64,linux-x64 | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: npm | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: read | |
| outputs: | |
| pkgjson: ${{ steps.pkg.outputs.json }} | |
| steps: | |
| - uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3 | |
| id: octo-sts | |
| with: | |
| scope: DataDog/libdatadog-nodejs | |
| policy: self.github.release.push-tags | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false # drop GITHUB_TOKEN so the dd-octo-sts token is used for the tag push | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: prebuilds | |
| path: prebuilds | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: chmod -R +x ./prebuilds | |
| - run: npm publish | |
| - id: pkg | |
| run: | | |
| content=`cat ./package.json | tr '\n' ' '` | |
| echo "json=$content" >> $GITHUB_OUTPUT | |
| - run: | | |
| git tag v${{ fromJson(steps.pkg.outputs.json).version }} | |
| git push https://x-access-token:${{ steps.octo-sts.outputs.token }}@github.com/${{ github.repository }}.git v${{ fromJson(steps.pkg.outputs.json).version }} |