forked from TheLimePixel/GregicAdditions
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to RFG/CEu Template Buildscripts (#179)
Co-authored-by: Exa <11907282+Exaxxion@users.noreply.github.com>
- Loading branch information
1 parent
ec70ec7
commit c805973
Showing
22 changed files
with
1,818 additions
and
528 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Publishes built jars to distribution platforms | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' # any semver tag, e.g. 1.2.3 | ||
|
||
env: | ||
# link to the changelog with a format code for the version | ||
CHANGELOG_LOCATION: "Changelog is available [here](https://github.com/${{github.repository}}/releases/tag/${{github.ref_name}})" | ||
|
||
jobs: | ||
Publish: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write # needed to create GitHub releases | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check for Duplicate Tags | ||
run: | | ||
if git rev-parse -q --verify "refs/tags/${{ github.ref }}" >/dev/null; then | ||
echo "Tag already exists. A version bump is required." | ||
exit 1 | ||
fi | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
|
||
- name: Build Project | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: 'build --build-cache --daemon' # use the daemon here so the rest of the process is faster | ||
generate-job-summary: false | ||
gradle-home-cache-includes: | | ||
caches | ||
jdks | ||
notifications | ||
wrapper | ||
- name: Publish to GitHub | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: "build/libs/*.jar" | ||
generate_release_notes: true | ||
fail_on_unmatched_files: true | ||
|
||
- name: Publish to Curseforge | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
CURSEFORGE_API_KEY: "${{secrets.CURSEFORGE_API_KEY}}" | ||
CURSEFORGE_PROJECT_ID: "${{secrets.CURSEFORGE_PROJECT_ID}}" | ||
CHANGELOG_LOCATION: "${{env.CHANGELOG_LOCATION}}" | ||
with: | ||
arguments: 'curseforge --daemon' | ||
generate-job-summary: false | ||
gradle-home-cache-includes: | | ||
caches | ||
jdks | ||
notifications | ||
wrapper |
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Publishes built jars to distribution platforms | ||
name: Publish (Beta) | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
# link to the changelog with a format code for the version | ||
CHANGELOG_LOCATION: "Changelog is available [here](https://github.com/${{github.repository}}/releases/tag/${{github.ref_name}})" | ||
# type of release | ||
RELEASE_TYPE: "beta" | ||
|
||
jobs: | ||
Publish: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write # needed to create GitHub releases | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Fetch Tags | ||
run: git fetch --prune --unshallow --tags --force | ||
|
||
- name: Check for Duplicate Tags | ||
run: | | ||
if git rev-parse -q --verify "refs/tags/${{ github.ref }}" >/dev/null; then | ||
echo "Tag already exists. A version bump is required." | ||
exit 1 | ||
fi | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
|
||
- name: Build Project | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: 'build --build-cache --daemon' # use the daemon here so the rest of the process is faster | ||
generate-job-summary: false | ||
gradle-home-cache-includes: | | ||
caches | ||
jdks | ||
notifications | ||
wrapper | ||
- name: Publish to Curseforge | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
CURSEFORGE_API_KEY: "${{secrets.CURSEFORGE_API_KEY}}" | ||
CURSEFORGE_PROJECT_ID: "${{secrets.CURSEFORGE_PROJECT_ID}}" | ||
CHANGELOG_LOCATION: "${{env.CHANGELOG_LOCATION}}" | ||
with: | ||
arguments: 'curseforge --daemon' | ||
generate-job-summary: false | ||
gradle-home-cache-includes: | | ||
caches | ||
jdks | ||
notifications | ||
wrapper |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Updates the Gradle Cache when relevant files change | ||
name: Update Gradle Cache | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "gradle**" # covers gradle folder, gradle.properties, gradlew | ||
- "build.gradle*" | ||
- "settings.gradle*" | ||
- "src/main/resources/*_at.cfg" # access transformers | ||
|
||
jobs: | ||
Update_Cache: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
|
||
- name: Update Cache | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: 'test --build-cache --no-daemon' # disable daemon since only one gradle operation will happen | ||
generate-job-summary: false | ||
gradle-home-cache-includes: | | ||
caches | ||
jdks | ||
notifications | ||
wrapper | ||
cache-write-only: true |
Oops, something went wrong.