forked from onlyhom/mobile-select
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 2.25 KB
/
build-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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: release npm package
on:
workflow_dispatch:
push:
branches: ["master"]
paths:
- "package.json"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup NodeJS
uses: actions/[email protected]
with:
node-version: 18
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 7
- name: Install dependency
run: pnpm install --frozen-lockfile --silent
- name: Build
run: pnpm run build
- name: Get package-version
uses: nyaa8/package-version@v1
- uses: EndBug/add-and-commit@v9
with:
message: "release: v${{ env.PACKAGE_VERSION }}"
committer_name: github-actions[bot]
committer_email: github-actions[bot]@users.noreply.github.com
push: true
- name: Publish NPM package
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
token: ${{ secrets.GH_TOKEN }}
default-branch: master
release-as: ${{ env.PACKAGE_VERSION }}
skip-github-release: false
changelog-types: |
[
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "perf", "section": "Performance", "hidden": false },
{ "type": "refactor", "section": "Refactor", "hidden": false },
{ "type": "docs", "section": "Documentation","hidden": false },
{ "type": "ci", "section": "CI/CD", "hidden": true },
{ "type": "revert", "section": "Reverts", "hidden": true },
{ "type": "test", "section": "Tests", "hidden": true },
{ "type": "build", "section": "Build", "hidden": true },
{ "type": "style", "section": "Styles", "hidden": true },
{ "type": "chore", "section": "Chores", "hidden": true }
]