-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (35 loc) · 1 KB
/
deploy.yml
File metadata and controls
39 lines (35 loc) · 1 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
name: Deploy
on:
release:
types:
- published
permissions:
id-token: write
contents: read
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@v5
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
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 }}
- name: Publish npm package
run: |
npm version $RELEASE_VERSION --no-git-tag-version
npm publish --access public