-
Notifications
You must be signed in to change notification settings - Fork 9
72 lines (70 loc) · 1.91 KB
/
Copy pathrelease.yml
File metadata and controls
72 lines (70 loc) · 1.91 KB
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
70
71
72
name: release
run-name: ${{ github.actor }} is automatically releasing 🚀
on:
repository_dispatch:
types:
- release
jobs:
release:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: 'Generate token'
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
- uses: actions/setup-node@v4
with:
node-version: latest
registry-url: https://registry.npmjs.org
always-auth: true
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- uses: vimtor/action-zip@v1
with:
files: package.json package-lock.json dist/
dest: dist.zip
- name: Semantic Release
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
NPM_CONFIG_PROVENANCE: true
run: npx semantic-release
merge:
needs: [release]
runs-on: ubuntu-latest
steps:
- name: Merge main back into dev
uses: devmasx/merge-branch@v1.4.0
with:
type: now
head_to_merge: main
target_branch: dev
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_docs:
needs: [release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
- uses: actions/setup-node@v4
with:
node-version: latest
- run: npm ci
- name: Build documentation
run: npm run docs:build
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/.vitepress/dist
cname: node-hypixel.zikeji.com