-
Notifications
You must be signed in to change notification settings - Fork 90
55 lines (54 loc) · 1.33 KB
/
main.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
name: build
on:
push:
branches:
- master
paths:
- "package.json"
pull_request:
branches:
- master
paths:
- "package.json"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: "master"
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
run: |
npm install -g pnpm
pnpm i --no-frozen-lockfile
- name: build
run: |
pnpm build
- name: zip
run: |
zip -r dist.zip dist
- id: tag
name: Generate release tag
run: |
SUB_STORE_RELEASE=`node --eval="process.stdout.write(require('./package.json').version)"`
echo "release_tag=$SUB_STORE_RELEASE" >> $GITHUB_OUTPUT
- name: Prepare release
run: |
pnpm i -D conventional-changelog-cli
pnpm run changelog
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ success() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body_path: ./CHANGELOG.md
tag_name: ${{ steps.tag.outputs.release_tag }}
# generate_release_notes: true
files: |
dist.zip