-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (41 loc) · 1.16 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
on:
push:
branches: ['master']
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install dependencies
uses: actions/setup-node@v3
- name: Install dependencies
run: yarn
- name: Build
run: yarn build
env:
NODE_ENV: production
- name: Test
run: yarn test
env:
NODE_ENV: production
HOP_TOKEN: ${{ secrets.HOP_TOKEN }}
- name: Check we have changesets since master
run: yarn changeset status --since=master
- name: Bump version
run: yarn changeset version
- name: Publish to npm
uses: changesets/action@v1
with:
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Commit changes
continue-on-error: true
run: |
git config --global user.email "[email protected]"
git config --global user.name "Hop CI"
git add .
git commit -m "Bump version"
git push -u --set-upstream origin master --force