cache .zig-cache #2
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 Tags | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
VERSION: ${{ github.ref_name }} | |
RELEASE_VERSION: ${{ github.ref_name }} | |
steps: | |
- name: Checkout mod repo | |
uses: actions/checkout@v4 | |
- name: Set up JDK versions | |
uses: actions/setup-java@v4 | |
with: | |
java-version: | | |
8 | |
17 | |
21 | |
distribution: 'adopt' | |
- name: Validate gradle wrapper checksum | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: RFG Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
build/classes/java/mcLauncher | |
build/classes/java/patchedMc | |
build/extra-mappings | |
build/lombok/effective-config/lombok-mcLauncher.config | |
build/lombok/effective-config/lombok-patchedMc.config | |
build/resources/patchedMc | |
build/rfg | |
build/tmp/.cache/expanded | |
build/tmp/compileMcLauncherJava | |
build/tmp/compilePatchedMcJava | |
build/tmp/deobfuscateMergedJarToSrg | |
build/tmp/packageMcLauncher | |
build/tmp/packagePatchedMc | |
key: rfg-cache | |
- name: Zig Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
.zig-cache | |
key: zig-cache | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Setup the workspace | |
run: ./gradlew --build-cache setupCIWorkspace | |
- name: Build the mod | |
run: ./gradlew --build-cache assemble | |
# Continue on error in the following steps to make sure releases still get made even if one of the methods fails | |
- name: Delete old release if it already exists | |
run: gh release delete --yes "${RELEASE_VERSION}" | |
continue-on-error: true | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release under current tag | |
run: gh release create "${RELEASE_VERSION}" ./build/libs/*.jar | |
shell: bash | |
continue-on-error: true | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to Maven | |
run: ./gradlew --build-cache assemble publish -x test | |
continue-on-error: true | |
env: | |
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }} | |
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }} | |
if: ${{ env.MAVEN_DEPLOY_USER != '' }} | |
- name: Publish to CurseForge | |
run: ./gradlew --build-cache assemble curseforge -x test | |
continue-on-error: true | |
env: | |
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} | |
- name: Publish to Modrinth | |
run: ./gradlew --build-cache assemble modrinth -x test | |
continue-on-error: true | |
env: | |
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} |