Release All #7
Workflow file for this run
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
name: Release All | |
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 }} | |
- 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: '' |