-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (39 loc) · 1 KB
/
release.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
name: Release
on:
push:
branches:
- master
jobs:
version:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release-please
with:
release-type: node
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
publish:
runs-on: ubuntu-latest
needs: [version]
# if: ${{ needs.version.outputs.release_created }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Build
run: yarn run build
- name: Check NPM_TOKEN
run: |
if [ -z "$NPM_TOKEN" ]; then
echo "NPM_TOKEN is not set"
exit 1
else
echo "NPM_TOKEN is set"
fi
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to NPM
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ".npmrc"
npm publish --access public
rm ".npmrc"