-
-
Notifications
You must be signed in to change notification settings - Fork 21
45 lines (36 loc) · 1.02 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
name: Build Logseq Plugin
on:
push:
branches:
- "main"
paths-ignore:
- 'README.md'
workflow_dispatch:
env:
PLUGIN_NAME: ${{ github.event.repository.name }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "20.x" # You might need to adjust this value to your own version
- uses: pnpm/action-setup@v4
with:
version: 9.4.0
- name: Build
id: build
run: |
pnpm i && pnpm run build
mkdir ${{ env.PLUGIN_NAME }}
cp README.md package.json icon.png ${{ env.PLUGIN_NAME }}
mv dist ${{ env.PLUGIN_NAME }}
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}
ls
echo "tag_name=git tag --sort version:refname | tail -n 1" >> $GITHUB_OUTPUT
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}