-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (56 loc) · 1.66 KB
/
release.yml
File metadata and controls
60 lines (56 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Release
on:
push:
branches:
- v0.x
jobs:
build-test-wasm:
runs-on: ubuntu-latest
strategy:
matrix:
crate:
- library_config
- datadog-js-zstd
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: write
outputs:
pkgjson: ${{ steps.pkg.outputs.json }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- 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 origin v${{ fromJson(steps.pkg.outputs.json).version }}