generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 14
55 lines (51 loc) · 1.41 KB
/
main.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
on:
push:
tags:
- '*.*.*'
workflow_dispatch:
inputs:
tag:
description: 'Test scenario tags'
required: true
type: string
permissions:
contents: write
name: Publish Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install wasm-bindgen-cli
run: cargo install wasm-bindgen-cli --git https://github.com/fenjalien/wasm-bindgen.git --rev 584383028e0fdb4bad927b4f886714ddfad2cd95
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Setup Node
uses: actions/[email protected]
with:
node-version: latest
- name: Install Dependencies
run: npm install
- name: Build
run: npm run wasm-build
- name: Release
if: ${{github.ref_type == 'tag'}}
uses: softprops/[email protected]
with:
tag_name: ${{ github.ref_name }}
files: |
main.js
styles.css
manifest.json
- name: Manual Release
if: ${{github.ref_type != 'tag'}}
uses: softprops/[email protected]
with:
tag_name: ${{ inputs.tag }}
files: |
main.js
styles.css
manifest.json