-
Notifications
You must be signed in to change notification settings - Fork 43
42 lines (34 loc) · 1.16 KB
/
release.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
name: Release Obsidian plugin
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
- name: Add extra dependency
run: |
node -e "
const fs = require('fs');
const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
packageJson.dependencies['papa-ts'] = '0.x';
fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 2));
"
- name: Install dependencies
run: bun install
- name: Build plugin
run: bun run build
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF#refs/tags/}"
gh release create "$tag" \
--title="$tag" \
--draft \
build/prod/main.js manifest.json build/prod/styles.css