-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (39 loc) · 1.33 KB
/
deploy.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
38
39
40
41
42
43
name: Deploy
on:
release:
types:
- published
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
if: ${{ !github.event.release.prerelease && github.event.release.target_commitish == 'main' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "12.x"
registry-url: "https://registry.npmjs.org"
- name: Build and test npm package
run: |
npm install
npm run test --if-present
env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
- name: Publish npm package
run: |
npm version $RELEASE_VERSION --no-git-tag-version
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}