forked from IdeallandEarthDept/IdeallandFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.23 KB
/
build_test.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
# This workflow will build and upload test artifact
# Simple workflow with ignoring condition to prevent unneccessary build
# To download artifact check on job task
name: Build Test Artifact
on:
push:
pull_request:
jobs:
build:
name: Build and Upload Artifact
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Grant Execute Permission for gradlew
run: chmod +x gradlew
- name: Change Mod version
run: sed -i "s/mod_version.*=.*/mod_version = test/g" gradle.properties
- name: Change Mod ID
run: sed -i "s/mod_id.*=.*/mod_id = example/g" gradle.properties
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'zulu'
cache: gradle
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build --info --stacktrace
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: example-1.12.2-test.jar
path: build/libs