generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 7
44 lines (44 loc) · 1 KB
/
latest.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
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
cache: npm
node-version: '*'
- run: npm ci
- run: npm run build
- run: |
npm pack --pack-destination=.github
for file in .github/*.tgz; do mv "$file" "${file%-*}.tgz"; done
- if: ${{github.ref == 'refs/tags/latest'}}
env:
GH_TOKEN: ${{github.token}}
run: |
gh release upload latest .github/*.tgz main.js manifest.json styles.css --clobber
build-pnpm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: pnpm/action-setup@v2
with:
version: '*'
- uses: actions/setup-node@v3
with:
cache: pnpm
node-version: '*'
- run: pnpm install
- run: pnpm build
on:
push:
tags:
- latest
workflow_dispatch:
permissions: {}