Skip to content

chore: Update workflow 文件 #42

chore: Update workflow 文件

chore: Update workflow 文件 #42

Workflow file for this run

name: Releases
# 触发条件:git tag
on:
push:
tags:
- 'v*'
#on: workflow_dispatch
jobs:
# release-windows:
# runs-on: windows-latest
# permissions:
# contents: write
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Set up JDK and Maven
# uses: actions/setup-java@v4
# with:
# distribution: 'corretto'
# java-version: '17'
# - name: Build executable
# shell: powershell
# run: sh deploy-windows.sh
# - name: Create Release
# uses: ncipollo/release-action@v1
# with:
# # 供用户下载使用的最终产物
# artifacts: "dist/SoNovel_win.tar.gz"
# token: ${{ secrets.GITHUB_TOKEN }}
release-linux:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK and Maven
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '17'
# - name: Set up mvnd
# run: |
# curl -s "https://get.sdkman.io" | bash
# source "$HOME/.sdkman/bin/sdkman-init.sh"
# sdk version
# sdk install mvnd
# mvnd -v
- name: Build executable
run: sh deploy-linux.sh
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/SoNovel_linux.tar.gz"
token: ${{ secrets.GITHUB_TOKEN }}