Deploy All Branches #1432
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: Deploy All | |
on: workflow_dispatch | |
env: | |
CF_APIKEY: ${{ secrets.CF_APIKEY }} | |
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: update cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.gradle/unimined | |
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up Gradle JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew --build-cache --info --stacktrace build | |
- name: Merge Jars with Gradle | |
run: ./gradlew --build-cache --info --stacktrace fusejars | |
- name: Deploy with Gradle | |
run: ./gradlew --build-cache --info --stacktrace :common:publishMod | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: build/libs/*.jar | |
- name: stop daemon | |
run: ./gradlew --stop |