-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
104 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,39 @@ | ||
name: Releases | ||
|
||
# 触发条件:git tag | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
#on: | ||
# push: | ||
# tags: | ||
# - 'v*' | ||
on: push | ||
|
||
jobs: | ||
release: | ||
# 运行环境 | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
# 拉取项目代码 | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
# Release | ||
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.11.2 | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
bodyFile: "README.md" | ||
# 供用户下载使用的最终产物 | ||
artifacts: "app.tar.gz" | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ buildNumber.properties | |
*.iml | ||
.idea | ||
download/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
mvn clean package "-DskipTests" | ||
|
||
cd target | ||
mkdir tmp | ||
mv app-jar-with-dependencies.jar tmp | ||
mv classes tmp | ||
pwd | ||
ls | ||
cd .. | ||
pwd | ||
ls | ||
|
||
jpackage \ | ||
--name "So Novel" \ | ||
--input "target/tmp" \ | ||
--dest dist \ | ||
--icon assets/logo.ico \ | ||
--app-version 1.5.1 \ | ||
--copyright "Copyright (C) 2024 pcdd. All rights reserved." \ | ||
--description "开源搜书神器" \ | ||
--vendor "github.com/pcdd-group" \ | ||
--about-url "github.com/pcdd-group/so-novel" \ | ||
--main-jar app-jar-with-dependencies.jar | ||
|
||
tar -zcvf app.tar.gz dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
mvn clean package "-DskipTests" | ||
|
||
cd target | ||
mkdir tmp | ||
mv app-jar-with-dependencies.jar tmp | ||
mv classes tmp | ||
pwd | ||
ls | ||
cd .. | ||
pwd | ||
ls | ||
|
||
# --win-console 控制台应用程序 | ||
# --win-shortcut 桌面上创建快捷方式 | ||
# --win-dir-chooser 用户可以选择安装目录 | ||
# --win-menu 添加到开始菜单(搜索用) | ||
# --vendor 应用程序的供应商(作者) | ||
# --input 待打包文件所在输入目录的路径 | ||
# --dest 生成的输出文件放置的路径 | ||
# --install-dir 默认安装位置下面的相对子路径 | ||
# --about-url 应用程序主页的 URL | ||
# 参数有 : 是非法字符,放在尾行 | ||
|
||
jpackage ` | ||
--name "So Novel" ` | ||
--input "target/tmp" ` | ||
--dest dist ` | ||
--icon assets/logo.ico ` | ||
--type exe ` | ||
--app-version 1.5.1 ` | ||
--copyright "Copyright (C) 2024 pcdd. All rights reserved." ` | ||
--description "开源搜书神器" ` | ||
--install-dir "So Novel" ` | ||
--win-console ` | ||
--win-dir-chooser ` | ||
--win-shortcut ` | ||
--win-shortcut-prompt ` | ||
--win-menu ` | ||
--vendor "github.com/pcdd-group" ` | ||
--about-url "github.com/pcdd-group/so-novel" ` | ||
--win-update-url "github.com/pcdd-group/so-novel/release" ` | ||
--main-jar app-jar-with-dependencies.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters