MizarZ

MizarZ's blog

Tænke og gøre.

Obsidian 插件的 Github Action 设置

来源 obsidian-tracker

代码

 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
name: Release # action 的名字

on:
  push:
    tags:
      - "*" # 在 push tags 后触发 action
  
jobs:
  build:
    permissions: 
      contents: write # 给 action 写的权限
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Use Node.js
      uses: actions/setup-node@v4
      with:
        node-version: '20.x'
    - name: Build
      run: | # 这两句是核心,安装包&构建程序
        yarn
        yarn run build
    - name: Release with Notes
      uses: softprops/action-gh-release@v1 # 使用了 gh-release 的包,快速生成文件
      with:
        files: |
          main.js
          manifest.json
          styles.css          
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

gh-relsease

新博客的第一篇博客

很久没有写博客了。恰逢迷茫之时,且之前一股脑将所有东西都扔到博客上面导致难以管理,决定重开博客,记录一下接下来时间遇到的问题和各种事情。

0%