v5.5.1 #46
This file contains 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: | |
- v[0-9]+.x | |
jobs: | |
build: | |
uses: Datadog/action-prebuildify/.github/workflows/build.yml@main | |
with: | |
target-name: 'dd_pprof' # target name in binding.gyp | |
package-manager: 'npm' # npm or yarn | |
cache: true # enable caching of dependencies based on lockfile | |
min-node-version: 16 | |
skip: 'linux-arm,linux-ia32' # skip building for these platforms | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
environment: npm | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm install | |
- run: npm publish | |
- id: pkg | |
run: | | |
content=`cat ./package.json | tr '\n' ' '` | |
echo "::set-output name=json::$content" | |
- run: | | |
git tag v${{ fromJson(steps.pkg.outputs.json).version }} | |
git push origin v${{ fromJson(steps.pkg.outputs.json).version }} |