Skip to content

Commit

Permalink
Add individual release workflows for quilt and fabric projects.
Browse files Browse the repository at this point in the history
  • Loading branch information
quinn-semele committed Oct 28, 2024
1 parent bf7c037 commit b31dd43
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/release_fabric.yml
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: ''
63 changes: 63 additions & 0 deletions .github/workflows/release_quilt.yml
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: ''

0 comments on commit b31dd43

Please sign in to comment.