-
Notifications
You must be signed in to change notification settings - Fork 21
59 lines (48 loc) · 1.47 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
51
52
53
54
55
56
57
58
59
name: Publish
on:
release:
types: [published]
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.release.target_commitish }}
- uses: pnpm/[email protected]
with:
version: 7.8.0
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install -no-frozen-lockfile
- name: Test
run: pnpm test
- name: Set up git
run: |
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config --local user.name 'github-actions[bot]'
- name: Bump version to ${{ github.event.release.tag_name }}
run: |
pnpm -F @ensdomains/thorin run ver ${{ github.event.release.tag_name }}
git add .
git commit -m "${{ github.event.release.tag_name }}"
- name: Copy README
run: |
cp README.md components/README.md
- name: Publish
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm config set //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
pnpm -F @ensdomains/thorin publish --no-git-checks
- name: Push changes
run: git push
env:
github-token: ${{ secrets.GITHUB_TOKEN }}