-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.23 KB
/
bundle.yaml
File metadata and controls
52 lines (45 loc) · 1.23 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
name: bundle
on:
push:
branches:
- master
- main
paths-ignore:
- dist/**
workflow_dispatch:
permissions:
actions: read
contents: write
concurrency:
group: ${{ github.workflow }}
jobs:
bundle:
if: github.repository != 'StageDog/tavern_helper_template'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JesseTG/rm@v1.0.3
with:
path: dist
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Setup pnpm
uses: pnpm/action-setup@v4.1.0
with:
version: 10
- run: pnpm install && pnpm format && pnpm build
- name: Commit changes
uses: EndBug/add-and-commit@v9.1.3
with:
default_author: github_actions
message: '[bot] bundle'
# 自动打版本 tag, 从而让 jsdelivr 基于版本号在 12h 内更新缓存而不是用非版本号的 7d 缓存
- id: autotag
uses: phish108/autotag-action@v1.1.64
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
with-v: true
- if: ${{ steps.autotag.outputs.tag != '0.0.0' }}
run: git push --delete origin ${{ steps.autotag.outputs.tag }}