-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (40 loc) · 1.15 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
44
45
46
47
48
49
50
51
52
name: Deploy To NPM
on:
workflow_dispatch:
push:
branches: [main]
env:
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
PAT: ${{ secrets.BEACHBALL_PAT }}
jobs:
publish:
name: Deploy To NPM
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ env.PAT }}
- name: Setup Node Version using nvmrc
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Unit Test
run: npm i && npm run test
- name: Beachball Check
run: |
npm run beachball:check
- name: Beachball Bump
run: |
npm run beachball:bump
- name: Prepack
run: npm run prepack
- name: Clear Beachball Changes
run: |
git reset --hard
- name: Deploy to NPM
run: |
git config user.email "[email protected]"
git config user.name "Beachball Machine Account"
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git
npm run beachball:publish -- --token ${{ env.NPM_ACCESS_TOKEN }}