-
Notifications
You must be signed in to change notification settings - Fork 12
54 lines (52 loc) · 1.65 KB
/
build-1.18.x.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
53
54
name: 'Build 1.18.x'
run-name: Build 1.18.x-${{ inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
default: '0.0.0-dev'
workflow_call:
inputs:
version:
required: true
type: string
jobs:
build-1-18-x:
runs-on: ubuntu-latest
defaults:
run:
working-directory: mc2discord-1.18.x
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-1.18.x-${{ runner.os }}-${{ hashFiles('**/gradle.properties', '**/build.gradle.kts', '**/settings.gradle', '**/gradle-wrapper.jar') }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
env:
INPUT_VERSION: ${{ inputs.version }}
- uses: actions/upload-artifact@v3
with:
name: mc2discord-forge-1.18.x-${{ inputs.version }}
path: |
${{ github.workspace }}/mc2discord-1.18.x/forge/build/libs/
!${{ github.workspace }}/mc2discord-1.18.x/forge/build/libs/*-slim.jar
- uses: actions/upload-artifact@v3
with:
name: mc2discord-fabric-1.18.x-${{ inputs.version }}
path: |
${{ github.workspace }}/mc2discord-1.18.x/fabric/build/libs/
!${{ github.workspace }}/mc2discord-1.18.x/fabric/build/libs/*-all.jar