Spaces:
Runtime error
Runtime error
ci: added "release" workflow
Browse files
.github/workflows/release.yml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Release
|
2 |
+
on:
|
3 |
+
workflow_dispatch:
|
4 |
+
push:
|
5 |
+
branches:
|
6 |
+
- main
|
7 |
+
|
8 |
+
jobs:
|
9 |
+
release:
|
10 |
+
name: Release
|
11 |
+
environment: release
|
12 |
+
runs-on: ubuntu-latest
|
13 |
+
if: "!contains(github.event.head_commit.message, 'chore(release)')"
|
14 |
+
|
15 |
+
steps:
|
16 |
+
- name: Checkout
|
17 |
+
uses: actions/checkout@v3
|
18 |
+
with:
|
19 |
+
fetch-depth: 0
|
20 |
+
persist-credentials: false
|
21 |
+
|
22 |
+
- name: Setup Node.js
|
23 |
+
uses: actions/setup-node@v3
|
24 |
+
with:
|
25 |
+
node-version: 18
|
26 |
+
|
27 |
+
- name: Install dependencies
|
28 |
+
run: npm install
|
29 |
+
|
30 |
+
- name: Release
|
31 |
+
env:
|
32 |
+
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
33 |
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
34 |
+
run: npx semantic-release
|