generated from PlazmaMC/Volt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
37 additions
and
14 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 |
---|---|---|
|
@@ -49,7 +49,7 @@ jobs: | |
uses: softprops/[email protected] | ||
with: | ||
name: "Release for ${{ github.ref_name }}" | ||
tag_name: ${{ github.ref_name }} | ||
tag_name: release/${{ github.ref_name }} | ||
target_commitish: ${{ github.ref_name }} | ||
generate_release_notes: true | ||
fail_on_unmatched_files: true | ||
|
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 |
---|---|---|
|
@@ -2,16 +2,39 @@ name: Always Up To Date | |
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "*/10 * * * *" | ||
- cron: "*/20 * * * *" | ||
|
||
jobs: | ||
prepare: | ||
name: Prepare Actions | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.matrix.outputs.matrix }} | ||
require: ${{ steps.require.outputs.require }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: base | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: zulu | ||
java-version: 21 | ||
|
||
- name: Determine if update is required | ||
id: require | ||
run: | | ||
REQUIRE=$(./gradlew -q checkNeedsUpdate) | ||
echo "$REQUIRE." | ||
echo "require=$REQUIRE" >> $GITHUB_OUTPUT | ||
- name: Pull Branches | ||
if: steps.require.outputs.require == 'false' | ||
id: matrix | ||
run: | | ||
respond=$(curl --silent https://api.github.com/repos/plazmamc/thunderbolt/branches | jq -rc 'del(.[]|.protected) | del(.[]|.commit)') | ||
|
@@ -20,7 +43,9 @@ jobs: | |
upstream: | ||
name: Update Base Upstream | ||
needs: prepare | ||
runs-on: ubuntu-latest | ||
if: needs.prepare.outputs.require == 'true' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
@@ -36,41 +61,33 @@ jobs: | |
distribution: zulu | ||
java-version: 21 | ||
|
||
- name: Determine if update is required | ||
id: check | ||
run: echo "needs=$(./gradlew -q checkNeedsUpdate)" >> $GITHUB_OUTPUT | ||
|
||
- name: Configure Git | ||
if: steps.check.outputs.needs == 'true' | ||
run: git config --global user.email "[email protected]" && git config --global user.name "Github Action" | ||
|
||
- name: Update upstream | ||
if: steps.check.outputs.needs == 'true' | ||
run: ./gradlew updateUpstream | ||
|
||
- name: Apply patches | ||
if: steps.check.outputs.needs == 'true' | ||
run: ./gradlew applyPatches | ||
|
||
- name: Check build | ||
if: steps.check.outputs.needs == 'true' | ||
run: ./gradlew build | ||
|
||
- name: Commit changes | ||
if: steps.check.outputs.needs == 'true' | ||
run: git add . && printf "Updated Upstream (Plazma)\n\nUpstream has released updates that appear to apply and compile correctly\n\n$(cat compare.txt)" | git commit -F - | ||
|
||
- name: Push changes | ||
if: steps.check.outputs.needs == 'true' | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
flavor: | ||
name: Update Flavors Upstream | ||
needs: prepare | ||
if: needs.prepare.outputs.require == 'false' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} | ||
steps: | ||
- name: Checkout repository | ||
|
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
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