Add release workflow

This commit is contained in:
vrabe 2025-05-15 02:49:01 +08:00
parent 02d7f54fba
commit b3315a804c
No known key found for this signature in database
GPG key ID: 6A5083B90DD60877

36
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,36 @@
name: Release plugin
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "22.x"
- name: Build plugin
run: |
pnpm install
pnpm generate
pnpm build
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF#refs/tags/}"
gh release create "$tag" \
--title="$tag" \
--draft \
main.js manifest.json