This commit is contained in:
parent
db054d9111
commit
3095f6670a
@ -9,34 +9,35 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Pull & Checkout"
|
||||
uses: https://ssl.lunadeer.cn:14446/actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: "Set up Maven"
|
||||
uses: https://ssl.lunadeer.cn:14446/actions/setup-maven@v4
|
||||
- name: "Set up JDK 17"
|
||||
uses: https://ssl.lunadeer.cn:14446/actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
cache: maven
|
||||
- name: "Build with Maven"
|
||||
run: mvn -B package --file pom.xml
|
||||
- name: "Copy jar to staging"
|
||||
run: mkdir staging && cp target/*.jar staging
|
||||
- name: "Build & test"
|
||||
run: |
|
||||
echo "done!"
|
||||
- name: "setup go for release script"
|
||||
run: |
|
||||
wget --no-check-certificate https://go.dev/dl/go1.21.6.linux-amd64.tar.gz
|
||||
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz
|
||||
ln -s /usr/local/go/bin/go /usr/bin/go
|
||||
go version
|
||||
- name: "Release"
|
||||
uses: https://ssl.lunadeer.cn:14446/actions/release-action@main
|
||||
with:
|
||||
files: |-
|
||||
staging/*.jar
|
||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
||||
- name: "Pull & Checkout"
|
||||
uses: https://ssl.lunadeer.cn:14446/actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: "Set up Maven"
|
||||
uses: https://ssl.lunadeer.cn:14446/actions/setup-maven@v4
|
||||
- name: "Set up JDK 17"
|
||||
uses: https://ssl.lunadeer.cn:14446/actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
cache: maven
|
||||
- name: "Build with Maven"
|
||||
run: mvn -B package --file pom.xml
|
||||
- name: "Copy jar to staging"
|
||||
run: mkdir staging && cp target/*.jar staging
|
||||
- name: "Build & test"
|
||||
run: |
|
||||
echo "done!"
|
||||
- name: "setup go for release script"
|
||||
run: |
|
||||
wget --no-check-certificate https://golang.google.cn/dl/go1.21.6.linux-amd64.tar.gz
|
||||
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz
|
||||
ln -s /usr/local/go/bin/go /usr/bin/go
|
||||
go version
|
||||
- name: "Release"
|
||||
uses: https://ssl.lunadeer.cn:14446/zhangyuheng/release-action@main
|
||||
with:
|
||||
note: "提示:带 ‘original-’ 前缀的文件无法用于运行,请下载不带此前缀的版本。"
|
||||
files: |-
|
||||
staging/*.jar
|
||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>ColorfulMap</artifactId>
|
||||
<version>1.2</version>
|
||||
<version>1.3</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ColorfulMap</name>
|
||||
|
@ -73,7 +73,7 @@ public class GiteaReleaseCheck {
|
||||
JSONObject latestRelease = (JSONObject) releaseList.get(0);
|
||||
GiteaRelease release = new GiteaRelease();
|
||||
release.tag_name = (String) latestRelease.get("tag_name");
|
||||
release.message = getTagMessage(release.tag_name);
|
||||
release.message = (String) latestRelease.get("body");
|
||||
release.html_url = (String) latestRelease.get("html_url");
|
||||
JSONArray assets = (JSONArray) latestRelease.get("assets");
|
||||
if (assets.size() > 0) {
|
||||
@ -87,7 +87,7 @@ public class GiteaReleaseCheck {
|
||||
XLogger.debug("HTML URL: " + latest_release.html_url);
|
||||
if (isNewVersion(current_version, latest_release.tag_name)) {
|
||||
XLogger.info("发现新版本:" + latest_release.tag_name);
|
||||
XLogger.info("更新内容:" + latest_release.message);
|
||||
XLogger.info("版本信息:" + latest_release.message);
|
||||
XLogger.info("下载页面:" + latest_release.html_url);
|
||||
} else {
|
||||
XLogger.info("当前已是最新版本:" + current_version);
|
||||
|
Loading…
Reference in New Issue
Block a user