generated from siyuan-note/plugin-sample
-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (69 loc) · 2.03 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Create Release on Tag Push
on:
push:
tags:
- "v*"
# env:
# PROJ_PATH: sy-tomato-plugin
# YARN_CACHE_DIR_PATH: ""
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout workspace repo # https://github.com/marketplace/actions/checkout#checkout-multiple-repos-side-by-side
# uses: actions/checkout@v4
# with:
# repository: IAliceBobI/sy-plugins
# - name: Install Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20
# registry-url: "https://registry.npmjs.org"
# - name: Install yarn
# run: npm install -g yarn
# - name: Set yarn cache directory
# shell: bash
# run: echo "YARN_CACHE_DIR_PATH=$(yarn cache dir)" >> $GITHUB_ENV
# - name: Cache dependencies
# uses: actions/cache@v4
# with:
# path: ${{ env.YARN_CACHE_DIR_PATH }}
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-
# - name: Install dependencies
# run: |
# cd $PROJ_PATH
# yarn install
# - name: Build for production
# run: |
# cd $PROJ_PATH
# yarn build
# mv package.zip ..
# - name: Release
# uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# artifactErrorsFailBuild: true
# artifacts: "package.zip"
# token: ${{ secrets.GITHUB_TOKEN }}
# prerelease: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run Script
run: |
cd dist
zip -r package.zip ./*
mv package.zip ..
- name: Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: "package.zip"
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false