This repository has been archived by the owner on Jun 22, 2024. It is now read-only.
forked from Fabricators-of-Create/Create
-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (54 loc) · 1.92 KB
/
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
53
54
55
56
57
58
59
60
61
62
name: build
on:
workflow_dispatch:
inputs:
publish:
description: Publish to Modrinth and CurseForge
required: true
default: "false"
patch:
description: Patch number, 0 for first (ex. Create 1.19.2 v0.5.0.g Patch N)
required: true
pull_request:
push:
jobs:
build:
strategy:
matrix:
java: [ 17 ]
runs-on: ubuntu-latest
env:
PUBLISH_SUFFIX: snapshots
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
PATCH_NUMBER: ${{ github.event.inputs.patch }}
PUBLISHING: ${{ github.event.inputs.publish }}
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/loom-cache
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew buildOrPublish
- name: capture build artifacts
uses: actions/upload-artifact@v2
with:
name: Artifacts
path: build/libs/
- name: publish to Maven
if: ${{ github.event.inputs.publish }}
run: ./gradlew publish