Skip to content

Commit

Permalink
Fix release workflow, use gradle actions
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Dec 24, 2023
1 parent ff5ddc9 commit 1b487f4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ jobs:
run: echo ::set-output name=commit_hash::${GITHUB_SHA:0:7}
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Use gradle cache for faster builds
uses: actions/cache@v1
distribution: 'microsoft'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Build with Gradle
run: ./gradlew build
env:
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
distribution: 'microsoft'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Build with Gradle
env:
POWAH_VERSION: ${{ github.event.release.tag_name }}
Expand All @@ -26,4 +29,4 @@ jobs:
CHANGELOG: ${{ github.event.release.body }}
CF_TOKEN: ${{ secrets.CURSEFORGE_API_KEY }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_API_KEY }}
run: ./gradlew :fabric:publishUnified :neoforge:publishUnified
run: ./gradlew :publishUnified

0 comments on commit 1b487f4

Please sign in to comment.