-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completely refactored compat structure
- Loading branch information
1 parent
fde37bc
commit 95333c9
Showing
71 changed files
with
709 additions
and
1,727 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
pull_request: | ||
jobs: | ||
build: | ||
if: ${{ github.event_name == 'push' && !startsWith(github.event.ref, 'refs/tags/') }} | ||
if: ${{ github.event_name == 'push' && !startsWith(github.event.ref, 'refs/tags/') && contains(github.event.head_commit.message, '[build skip]') == false }} | ||
strategy: | ||
matrix: | ||
java: [ 17 ] | ||
|
@@ -28,9 +28,12 @@ jobs: | |
- name: Cache Gradle packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
path: | | ||
~/.gradle/caches | ||
./.gradle/loom-caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle', 'gradle.properties', '**/*.accesswidener') }} | ||
restore-keys: ${{ runner.os }}-gradle- | ||
|
||
- name: Get short commit sha | ||
id: get_short_sha | ||
|
@@ -55,6 +58,13 @@ jobs: | |
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Preprocess resources | ||
env: | ||
COMMIT_SHA: ${{ steps.get_short_sha.outputs.short_sha }} | ||
BUILD_TYPE: "BETA" | ||
BUILD_NUMBER: ${{ github.run_number }} | ||
run: ./gradlew preprocessResources | ||
|
||
- name: Build with Gradle | ||
env: | ||
COMMIT_SHA: ${{ steps.get_short_sha.outputs.short_sha }} | ||
|
@@ -66,7 +76,10 @@ jobs: | |
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ steps.mod_name.outputs.value }} ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }} | ||
path: build/libs/ | ||
path: | | ||
LICENSE | ||
fabricWrapper/build/libs/*.jar | ||
fabricWrapper/build/tmp/submods/META-INF/jars/*.jar | ||
- name: Create Github Release | ||
if: contains(github.event.head_commit.message, '[publish skip]') == false && contains(github.event.ref, 'refs/heads/exp') == false | ||
|
@@ -75,7 +88,8 @@ jobs: | |
prerelease: true | ||
files: | | ||
LICENSE | ||
build/libs/*.jar | ||
fabricWrapper/build/libs/*.jar | ||
fabricWrapper/build/tmp/submods/META-INF/jars/*.jar | ||
name: "[CI#${{ github.run_number}}]${{ steps.mod_name.outputs.value }} ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }}" | ||
tag_name: "CI/build.${{ github.run_number}}" | ||
target_commitish: ${{ github.event.ref }} | ||
|
@@ -101,9 +115,12 @@ jobs: | |
- name: Cache Gradle packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
path: | | ||
~/.gradle/caches | ||
./.gradle/loom-caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle', 'gradle.properties', '**/*.accesswidener') }} | ||
restore-keys: ${{ runner.os }}-gradle- | ||
|
||
- name: Get short commit sha | ||
id: get_short_sha | ||
|
@@ -128,6 +145,13 @@ jobs: | |
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Preprocess resources | ||
env: | ||
COMMIT_SHA: ${{ steps.get_short_sha.outputs.short_sha }} | ||
BUILD_TYPE: "RELEASE" | ||
BUILD_NUMBER: ${{ github.run_number }} | ||
run: ./gradlew preprocessResources | ||
|
||
- name: Build with Gradle | ||
env: | ||
COMMIT_SHA: ${{ steps.get_short_sha.outputs.short_sha }} | ||
|
@@ -139,13 +163,19 @@ jobs: | |
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ steps.mod_name.outputs.value }} ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }} | ||
path: build/libs/ | ||
path: | | ||
LICENSE | ||
fabricWrapper/build/libs/*.jar | ||
fabricWrapper/build/tmp/submods/META-INF/jars/*.jar | ||
- name: Upload assets to GitHub Release | ||
uses: AButler/[email protected] | ||
- name: Upload assets to Github Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: 'build/libs/*' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
files: | | ||
LICENSE | ||
fabricWrapper/build/libs/*.jar | ||
fabricWrapper/build/tmp/submods/META-INF/jars/*.jar | ||
tag_name: ${{ github.event.ref }} | ||
|
||
pull_request: | ||
if: ${{ github.event_name == 'pull_request' }} | ||
|
@@ -168,5 +198,8 @@ jobs: | |
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Preprocess resources | ||
run: ./gradlew preprocessResources | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build |
Oops, something went wrong.