-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (51 loc) · 1.55 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
47
48
49
50
51
name: Release
on:
push:
branches:
- master
jobs:
release:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.WOOSMAP_GH_ACCESS_TOKEN }}
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm i
- run: npm run build
- name: Update dist
run: |
npm run build
git config --global user.name 'wgsadmin'
git config --global user.email 'operations@webgeoservices.com'
git add dist
git commit -m "chore: update dist folder [skip ci]" || true
git push origin
env:
GH_TOKEN: ${{ secrets.PUBLIC_GITHUB_TOKEN }}
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
with:
extra_plugins: |
"@semantic-release/commit-analyzer"
"@semantic-release/release-notes-generator"
"@semantic-release/npm"
"@semantic-release/git"
"@semantic-release/github"
env:
GH_TOKEN: ${{ secrets.WOOSMAP_GH_ACCESS_TOKEN }}
NPM_TOKEN: skip
- name: Push samples to branches
run: |
bash ./sample-to-branch.sh
env:
GITHUB_TOKEN: ${{ secrets.WOOSMAP_GH_ACCESS_TOKEN }}