-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add individual release workflows for quilt and fabric projects.
- Loading branch information
1 parent
bf7c037
commit b31dd43
Showing
2 changed files
with
126 additions
and
0 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,63 @@ | ||
name: Release Fabric | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
dryRun: | ||
description: "Dry Run" | ||
required: true | ||
type: boolean | ||
default: false | ||
ignoreCache: | ||
description: "Ignore Gradle Cache" | ||
required: true | ||
type: boolean | ||
default: false | ||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
strategy: | ||
matrix: | ||
java: [ | ||
21, | ||
] | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
mod-version: ${{ steps.grab_version.outputs.mod-version }} | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
- name: validate gradle wrapper | ||
uses: gradle/actions/wrapper-validation@v3 | ||
- name: setup jdk ${{ matrix.java }} | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: 'microsoft' | ||
- name: make gradle wrapper executable | ||
run: chmod +x ./gradlew | ||
- name: setup gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
with: | ||
cache-write-only: ${{ github.event.inputs.ignoreCache }} | ||
- name: publish mod | ||
run: ./gradlew :publishMods | ||
env: | ||
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} | ||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | ||
PUBLISH_WEBHOOK: ${{ secrets.PUBLISH_WEBHOOK }} | ||
MULTILOADER_DRY_RUN: ${{ github.event.inputs.dryRun }} | ||
MULTILOADER_PUBLISH_PROJECTS: "fabric" | ||
- name: grab mod version | ||
id: grab_version | ||
run: ./gradlew -q :logVersion >> "$GITHUB_OUTPUT" | ||
- name: Tag release | ||
id: tag_version | ||
uses: mathieudutour/github-tag-action@v6.2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
custom_tag: ${{ steps.grab_version.outputs.mod-version }} | ||
tag_prefix: '' |
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,63 @@ | ||
name: Release Quilt | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
dryRun: | ||
description: "Dry Run" | ||
required: true | ||
type: boolean | ||
default: false | ||
ignoreCache: | ||
description: "Ignore Gradle Cache" | ||
required: true | ||
type: boolean | ||
default: false | ||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
strategy: | ||
matrix: | ||
java: [ | ||
21, | ||
] | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
mod-version: ${{ steps.grab_version.outputs.mod-version }} | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
- name: validate gradle wrapper | ||
uses: gradle/actions/wrapper-validation@v3 | ||
- name: setup jdk ${{ matrix.java }} | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: 'microsoft' | ||
- name: make gradle wrapper executable | ||
run: chmod +x ./gradlew | ||
- name: setup gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
with: | ||
cache-write-only: ${{ github.event.inputs.ignoreCache }} | ||
- name: publish mod | ||
run: ./gradlew :publishMods | ||
env: | ||
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} | ||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | ||
PUBLISH_WEBHOOK: ${{ secrets.PUBLISH_WEBHOOK }} | ||
MULTILOADER_DRY_RUN: ${{ github.event.inputs.dryRun }} | ||
MULTILOADER_PUBLISH_PROJECTS: "quilt" | ||
- name: grab mod version | ||
id: grab_version | ||
run: ./gradlew -q :logVersion >> "$GITHUB_OUTPUT" | ||
- name: Tag release | ||
id: tag_version | ||
uses: mathieudutour/github-tag-action@v6.2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
custom_tag: ${{ steps.grab_version.outputs.mod-version }} | ||
tag_prefix: '' |