-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (74 loc) · 2.24 KB
/
Copy pathnodejs-package.yml
File metadata and controls
78 lines (74 loc) · 2.24 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Node.js Package
on:
push:
branches:
- '*'
release:
types: [created]
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- run: npm install -g corepack@0.34.0
- run: corepack enable
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 22
- run: |
cd packages/host-card-emulation
yarn
- run: |
cd packages/host-card-emulation
yarn pack
publish-npm:
if: github.event.release
needs: build
runs-on: ubuntu-24.04
environment: production
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- run: npm install -g corepack@0.34.0
- run: corepack enable
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 22
- run: yarn
- run: |
yarn config set npmRegistryServer "https://registry.npmjs.org"
yarn config set npmAlwaysAuth "true"
yarn config set npmAuthToken "$NODE_AUTH_TOKEN"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: |
cd packages/host-card-emulation
yarn npm publish --provenance --access public
publish-gpr:
if: github.event.release
needs: build
runs-on: ubuntu-24.04
environment: production
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- run: npm install -g corepack@0.34.0
- run: corepack enable
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 22
- run: yarn
- run: |
yarn config set npmRegistryServer "https://npm.pkg.github.com"
yarn config set npmAlwaysAuth "true"
yarn config set npmAuthToken "$NODE_AUTH_TOKEN"
env:
NODE_AUTH_TOKEN: ${{ github.token }}
- run: |
cd packages/host-card-emulation
yarn npm publish --provenance --access public