ci: 添加自动发行工作流

This commit is contained in:
Coldsmile_7
2026-04-15 01:37:08 +08:00
parent 633b7beaa3
commit cce34236cf
2 changed files with 33 additions and 47 deletions

32
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 设置 Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: 构建插件
run: mvn clean package -B
- name: 创建发行版
uses: softprops/action-gh-release@v1
with:
files: target/essentialsc-*.jar
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}