generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 17
63 lines (53 loc) · 2.01 KB
/
build.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
56
57
58
59
60
61
62
63
name: Build Obsidian Transcription Beta
# Thanks @ClareMacrae!
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Cache dependencies
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
# Install pnpm
- name: Install pnpm
run: npm install -g pnpm
# Install modules using pnpm
- name: Install modules
run: pnpm install
# Rest of your steps
- name: Run build
run: pnpm run build
- name: Run TypeScript compiler ESLint
run: pnpm run lint
- name: Archive verified build
uses: actions/upload-artifact@v3
with:
name: obsidian-transcription
path: |
main.js
manifest.json
styles.css
# https://github.com/obsidian-tasks-group/obsidian-tasks/blob/7585a058e4c3f1a220a4ba8079f6897d92e52dbe/.github/workflows/verify.yml#L29-L46
# - name: Copy new build to Tasks-Demo vault
# run: ./scripts/Test-TasksInLocalObsidian.sh
# - name: Archive Tasks-Demo vault
# uses: actions/upload-artifact@v3
# with:
# name: Tasks-Demo-VerifyCommit-Build${{ github.run_number }}-Run${{ github.run_attempt }}
# path: |
# resources/sample_vaults/Tasks-Demo