-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
6 changed files
with
272 additions
and
53 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Update Gradle Dependency Graph | ||
|
||
on: | ||
push: | ||
branches: | ||
# Submitting dependency graph reports on non-default branches does nothing | ||
- "master" | ||
tags-ignore: | ||
- "**" | ||
paths: | ||
- "gradle**" | ||
- "*.gradle" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
dependency-submission: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Java 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "21" | ||
distribution: "microsoft" | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Generate and submit dependency graph | ||
uses: gradle/actions/dependency-submission@v4 | ||
with: | ||
build-scan-publish: true | ||
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use" | ||
build-scan-terms-of-use-agree: "yes" |
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 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,87 @@ | ||
name: Publish Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
close_milestone: | ||
description: "Close milestone" | ||
required: true | ||
type: boolean | ||
default: true | ||
upload_backups: | ||
description: "Upload to backups server" | ||
required: true | ||
type: boolean | ||
default: true | ||
publish_github: | ||
description: "Publish to GitHub" | ||
required: true | ||
type: boolean | ||
default: true | ||
publish_curseforge: | ||
description: "Publish to CurseForge" | ||
required: true | ||
type: boolean | ||
default: true | ||
publish_modrinth: | ||
description: "Publish to Modrinth" | ||
required: true | ||
type: boolean | ||
default: true | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
env: | ||
WI_BACKUPS_API_KEY: ${{ secrets.WI_BACKUPS_API_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }} | ||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Java 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "21" | ||
distribution: "microsoft" | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Build | ||
run: ./gradlew build --stacktrace --warning-mode=fail | ||
|
||
- name: Create and push tag | ||
run: | | ||
MOD_VERSION=$(grep "mod_version" gradle.properties | cut -d'=' -f2 | tr -d ' ') | ||
git config --global user.name "Wurst-Bot" | ||
git config --global user.email "[email protected]" | ||
git tag v$MOD_VERSION | ||
git push origin v$MOD_VERSION | ||
- name: Close milestone | ||
if: ${{ inputs.close_milestone }} | ||
run: ./gradlew closeMilestone --stacktrace | ||
|
||
- name: Upload backups | ||
if: ${{ inputs.upload_backups }} | ||
run: ./gradlew uploadBackups --stacktrace | ||
|
||
- name: Publish to GitHub | ||
if: ${{ inputs.publish_github }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.MCX_PUBLISH_TOKEN }} | ||
run: ./gradlew github --stacktrace | ||
|
||
- name: Publish to CurseForge | ||
if: ${{ inputs.publish_curseforge }} | ||
run: ./gradlew publishCurseforge --stacktrace | ||
|
||
- name: Publish to Modrinth | ||
if: ${{ inputs.publish_modrinth }} | ||
run: ./gradlew publishModrinth --stacktrace |
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
Oops, something went wrong.