Skip to content

Commit

Permalink
updated CI gradle actions
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Jul 31, 2024
1 parent ce5cd9f commit d5f9e39
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,23 @@ jobs:
uses: gradle/wrapper-validation-action@v1
- name: Remove any generated assets/data
run: rm -rf ./src/generated
- name: Generate assets & data
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
arguments: runData --no-daemon
- name: Generate assets & data
run: ./gradlew runData --no-Daemon
- name: Validate assets
run: test -d ./src/generated -a -d ./src/generated/resources/.cache
- name: Set up mod metadata
id: mod_meta
run: |
echo mc_version=$(grep ^minecraft_version= ./gradle.properties | cut -d= -f2) >> $GITHUB_OUTPUT
- name: Build JAR and Publish to Modmaven
uses: gradle/actions/setup-gradle@v3
run: ./gradlew build publishMavenPublicationToModmavenRepository --no-daemon
env:
MODMAVEN_USER: ${{ secrets.MODMAVEN_USER }}
MODMAVEN_PASSWORD: ${{ secrets.MODMAVEN_PASSWORD }}
with:
cache-read-only: false
arguments: build publishMavenPublicationToModmavenRepository --no-daemon
- name: Discord notification
uses: Ilshidur/action-discord@master
env:
Expand Down
26 changes: 10 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,35 @@ jobs:
java-version: '21'
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Remove any generated assets/data
run: rm -rf ./src/generated
- name: Generate assets & data
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
arguments: runData --no-daemon
- name: Remove any generated assets/data
run: rm -rf ./src/generated
- name: Generate assets & data
run: ./gradlew runData --no-Daemon
- name: Validate assets
run: test -d ./src/generated -a -d ./src/generated/resources/.cache
- name: Build JAR
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
arguments: build --no-daemon
run: ./gradlew build --no-daemon
env:
BUILD_NUMBER: ${{ github.run_number }}
- name: Set up mod metadata
id: mod_meta
run: |
echo mod_version=$(grep ^mod_version= ./gradle.properties | cut -d= -f2) >> $GITHUB_OUTPUT
echo mc_version=$(grep ^mc_version= ./gradle.properties | cut -d= -f2) >> $GITHUB_OUTPUT
- name: Publish to Modmaven
uses: gradle/actions/setup-gradle@v3
- name: Build JAR and Publish to Modmaven
run: ./gradlew build publishMavenPublicationToModmavenRepository --no-daemon
env:
MODMAVEN_USER: ${{ secrets.MODMAVEN_USER }}
MODMAVEN_PASSWORD: ${{ secrets.MODMAVEN_PASSWORD }}
with:
arguments: publishMavenPublicationToModmavenRepository --no-daemon
- name: Publish to Curseforge/Modrinth
uses: gradle/actions/setup-gradle@v3
run: ./gradlew publishMods --no-daemon
env:
CHANGELOG: ${{ github.event.release.body }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
BUILD_NUMBER: ${{ github.run_number }}
with:
arguments: publishMods --no-daemon
BUILD_NUMBER: ${{ github.run_number }}

0 comments on commit d5f9e39

Please sign in to comment.