-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (50 loc) · 1.39 KB
/
gradle-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Publish Jar
on:
workflow_dispatch:
inputs:
tag:
description: Release git tag
type: string
required: true
push:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
pull-requests: write
repository-projects: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
server-id: lagassist
settings-path: ${{ github.workspace }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5
- name: Build with Gradle 1.20.4
run: MC_VERSION=1.20.4 ./gradlew build
- name: Build with Gradle 1.20.6
run: MC_VERSION=1.20.6 ./gradlew build
- name: Build with Gradle Latest
run: ./gradlew build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts-jar
path: ./build/libs/*
- name: Publish release
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: ncipollo/release-action@v1
with:
artifacts: ./build/libs/*
tag: ${{ inputs.tag }}
name: LagAssist ${{ inputs.tag }}
allowUpdates: true
artifactErrorsFailBuild: false
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}