-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (47 loc) · 1.25 KB
/
publish.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 plugin
on:
push:
tags:
- '*'
env:
PLUGIN_NAME: logseq-live-math
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: true
- name: Build
id: build
run: |
pnpm build
mkdir ${{ env.PLUGIN_NAME }}
cp -r README.md LICENSE dist index.html package.json icon.svg ${{ env.PLUGIN_NAME }}
tag_name=$(git tag --sort version:refname | tail -n 1)
zip -r ${{ env.PLUGIN_NAME }}-${tag_name}.zip ${{ env.PLUGIN_NAME }}
echo "tag_name=$tag_name" >> "$GITHUB_OUTPUT"
- name: Generate Changelog
uses: orhun/git-cliff-action@v3
id: changelog
with:
args: --latest
- name: Release
uses: softprops/action-gh-release@v2
with:
body: ${{ steps.changelog.outputs.content }}
files: |
${{ env.PLUGIN_NAME }}-*.zip
package.json