-
Notifications
You must be signed in to change notification settings - Fork 15
54 lines (46 loc) · 1.21 KB
/
CI.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: CI
on:
push:
paths-ignore:
- docs/**
- cmake/**
- .vscode/**
- README.md
jobs:
CI:
runs-on: ubuntu-latest
env:
CURSE_API_KEY: ${{ secrets.CURSE_API_KEY }}
strategy:
matrix:
java: [17]
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
submodules: true
# Fetch all to make git describe work correctly
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
${GITHUB_WORKSPACE}/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build
run: gradle build
- name: Upload to CurseForge
if: startsWith(github.ref, 'refs/tags/')
run: gradle curseforge
- name: Commit 'CurseForgeLatest.json'
if: always()
uses: EndBug/add-and-commit@v7
with:
add: "CurseForgeLatest.json"
message: " Updated CurseForge Version File"