This repository has been archived on 2024-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
Dominion/.gitea/workflows/build.yml

41 lines
1.3 KiB
YAML
Raw Normal View History

2024-02-04 17:54:17 +08:00
name: Java CI-CD with Maven
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Pull & Checkout"
uses: https://ssl.lunadeer.cn:14446/actions/checkout@v3
with:
fetch-depth: 0
2024-08-02 10:22:44 +08:00
- name: "Set up JDK 21"
2024-02-04 17:54:17 +08:00
uses: https://ssl.lunadeer.cn:14446/actions/setup-java@v3
with:
2024-08-02 10:22:44 +08:00
java-version: '21'
2024-02-04 17:54:17 +08:00
distribution: 'zulu'
2024-08-02 10:22:44 +08:00
cache: gradle
- name: "Build with Gradle"
run: ./gradlew shadowJar
2024-02-04 17:54:17 +08:00
- name: "Copy jar to staging"
2024-08-02 10:22:44 +08:00
run: mkdir staging && cp build/libs/*.jar staging/
2024-02-04 17:54:17 +08:00
- name: "Build & test"
run: |
echo "done!"
- name: "setup go for release script"
run: |
2024-03-25 11:07:04 +08:00
wget --no-check-certificate https://golang.google.cn/dl/go1.21.6.linux-amd64.tar.gz
2024-02-04 17:54:17 +08:00
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
2024-02-04 17:54:17 +08:00
with:
2024-05-08 11:38:41 +08:00
note: " - 带 `original-` 前缀的文件无法用于运行,请下载不带此前缀的版本。"
2024-02-04 17:54:17 +08:00
files: |-
staging/*.jar
api_key: '${{secrets.RELEASE_TOKEN}}'