-
Notifications
You must be signed in to change notification settings - Fork 10
45 lines (38 loc) · 1.03 KB
/
publish.yaml
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
name: Publish
on:
push:
branches: [ master, next ]
env:
GH_TOKEN: ${{ secrets.GH_ADMIN_REPO_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
permissions:
contents: write
issues: write
pull-requests: write
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set git config
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.event.pusher.email }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install
if: steps.cache-modules.outputs.cache-hit != 'true'
run: npm install
- name: Build
if: steps.cache-modules.outputs.cache-hit != 'true'
run: npm run build
- name: Semantic Release
run: npx semantic-release