Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit 0841b64

Browse files
committed
github workflow
1 parent 295e069 commit 0841b64

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build & Release
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
push:
7+
8+
concurrency:
9+
group: ${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
name: Build
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 10
23+
24+
- name: Set up JDK 21
25+
uses: actions/setup-java@v2
26+
with:
27+
java-version: 21
28+
distribution: temurin
29+
30+
- uses: actions/[email protected]
31+
with:
32+
path: |
33+
~/.gradle/caches
34+
~/.gradle/wrapper
35+
**/loom-cache
36+
**/prebundled-jars
37+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
38+
restore-keys: |
39+
${{ runner.os }}-gradle-
40+
41+
- name: Chmod Gradle
42+
run: chmod +x ./gradlew
43+
44+
- name: Build
45+
run: ./gradlew build --no-daemon
46+
47+
- name: Upload Artifact
48+
uses: actions/[email protected]
49+
with:
50+
name: Built Jar
51+
path: build/libs/*.jar
52+
53+
- name: Automatic Release
54+
uses: marvinpinto/[email protected]
55+
with:
56+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
57+
automatic_release_tag: "latest"
58+
prerelease: false
59+
title: "Releases ${{ env.sha_short }}"
60+
files: |
61+
build/libs/*.jar

0 commit comments

Comments
 (0)