Skip to content

Commit

Permalink
update CI (deprecated gradle action usage)
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Nov 25, 2024
1 parent c151c19 commit 596bc7d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 30 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,23 @@ jobs:
uses: gradle/wrapper-validation-action@v1
- name: Remove any generated assets/data
run: rm -rf ./src/generated
- name: Generate assets & data
uses: gradle/actions/setup-gradle@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
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
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
arguments: build --no-daemon
- 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:
cache-read-only: false
arguments: publishMavenPublicationToModmavenRepository --no-daemon
- name: Discord notification
uses: Ilshidur/action-discord@master
env:
Expand Down
26 changes: 9 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,18 @@ jobs:
java-version: '21'
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: false
- name: Remove any generated assets/data
run: rm -rf ./src/generated
- name: Generate assets & data
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
arguments: runData --no-daemon
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
Expand All @@ -46,21 +44,15 @@ jobs:
echo mod_version=$(grep ^mod_version= ./gradle.properties | cut -d= -f2) >> $GITHUB_OUTPUT
echo mc_version=$(grep ^minecraft_version= ./gradle.properties | cut -d= -f2) >> $GITHUB_OUTPUT
- name: Publish to Modmaven
uses: gradle/actions/setup-gradle@v3
run: ./gradlew publishMavenPublicationToModmavenRepository --no-daemon
env:
MODMAVEN_USER: ${{ secrets.MODMAVEN_USER }}
MODMAVEN_PASSWORD: ${{ secrets.MODMAVEN_PASSWORD }}
with:
cache-read-only: false
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:
cache-read-only: false
arguments: publishMods --no-daemon
BUILD_NUMBER: ${{ github.run_number }}

0 comments on commit 596bc7d

Please sign in to comment.