LiteWorldEdit/.gitea/workflows/build.yml

40 lines
1.0 KiB
YAML
Raw Normal View History

name: Java CI with Maven
on:
push:
2023-12-07 11:54:48 +08:00
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
2023-12-07 11:29:04 +08:00
- name: "Pull & Checkout"
uses: https://ssl.lunadeer.cn:14446/actions/checkout@v3
2023-12-07 11:09:35 +08:00
with:
fetch-depth: 0
2023-12-07 10:57:50 +08:00
- name: "Set up Maven"
2023-12-07 11:22:53 +08:00
uses: https://ssl.lunadeer.cn:14446/actions/setup-maven@v4
2023-12-07 10:57:50 +08:00
- name: "Set up JDK 17"
2023-12-07 11:22:53 +08:00
uses: https://ssl.lunadeer.cn:14446/actions/setup-java@v3
with:
java-version: '17'
2023-12-07 11:29:04 +08:00
distribution: 'zulu'
cache: maven
2023-12-07 10:57:50 +08:00
- name: "Build with Maven"
run: mvn -B package --file pom.xml
2023-12-07 11:06:51 +08:00
- name: "Copy jar to staging"
run: mkdir staging && cp target/*.jar staging
- name: "Build & test"
run: |
echo "done!"
2023-12-07 11:06:51 +08:00
- name: "setup go for release script"
2023-12-07 11:22:53 +08:00
uses: https://ssl.lunadeer.cn:14446/actions/setup-go@v4
2023-12-07 11:06:51 +08:00
with:
go-version: '>=1.20.1'
2023-12-07 10:52:38 +08:00
- name: "Release"
2023-12-07 11:22:53 +08:00
uses: https://ssl.lunadeer.cn:14446/actions/release-action@main
with:
2023-12-07 10:52:38 +08:00
files: |-
staging/*.jar
2023-12-07 10:52:38 +08:00
api_key: '${{secrets.RELEASE_TOKEN}}'