-
-
Notifications
You must be signed in to change notification settings - Fork 67
37 lines (34 loc) · 881 Bytes
/
npm-publish.yml
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
name: Publish to NPM
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
environment: Staging Environment
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm i
- run: npm test
env:
accessToken: ${{secrets.ACCESSTOKEN}}
graphAPIVersion: ${{secrets.GRAPHAPIVERSION}}
senderPhoneNumberId: ${{secrets.SENDERPHONENUMBERID}}
WABA_ID: ${{secrets.WABA_ID}}
publish-npm:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm i
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN_IN_GITHUB_ACTIONS}}