Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
OffsetMonkey538 committed May 2, 2024
1 parent a4cb8cf commit 1a1bd63
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 24 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/build_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: Make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
run: ./gradlew build
env:
DISABLE_PROPERTIES_UPDATE: true
with:
arguments: build

- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
22 changes: 9 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,28 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: Make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
run: ./gradlew build
env:
DISABLE_PROPERTIES_UPDATE: true
with:
arguments: build

- name: Upload to Modrinth
uses: gradle/gradle-build-action@v2
run: ./gradlew modrinth
env:
DISABLE_PROPERTIES_UPDATE: true
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
VERSION_NAME: ${{ github.event.release.name }}
with:
arguments: modrinth

- name: Upload to GitHub
uses: svenstaro/upload-release-action@v2
Expand Down

0 comments on commit 1a1bd63

Please sign in to comment.