-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (48 loc) · 1.62 KB
/
publish.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
name: Build plugin
on:
push:
tags:
- '*'
env:
PLUGIN_NAME: logseq-catppuccin
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # You might need to adjust this value to your own version
- name: Build
id: build
run: |
npm i && npm run build # sass -> css
mkdir ${{ env.PLUGIN_NAME }} # folder for zip
mkdir ${{ env.PLUGIN_NAME }}/assets # folder for icon
cp assets/icon.png ${{ env.PLUGIN_NAME }}/assets # move icon
cp README.md package.json index.html index.js ctp-latte.css ctp-frappe.css ctp-macchiato.css ctp-mocha.css ctp-oled.css ${{ env.PLUGIN_NAME }} # move build assets
zip -r ${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip ${{ env.PLUGIN_NAME }} # create zip
- name: Create Release
uses: softprops/action-gh-release@v1
id: create_release
with:
draft: true
files: |
package.json
${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip
ctp-latte.css
ctp-frappe.css
ctp-macchiato.css
ctp-mocha.css
ctp-oled.css
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./${{ env.PLUGIN_NAME }}/
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
cname: logseq.catppuccin.com