Skip to content

Commit

Permalink
Update action script
Browse files Browse the repository at this point in the history
  • Loading branch information
dexman545 committed Sep 7, 2023
1 parent 8922899 commit 4636b78
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 21 deletions.
51 changes: 32 additions & 19 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,37 @@ name: Java CI
on: [push]

jobs:
build:

publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build with Gradle
run: ./gradlew build
- name: Publish to Distributors
env:
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
KEY_STORE_ALIAS: ${{ secrets.KEY_STORE_ALIAS }}
KEY_STORE_KEY_PASS: ${{ secrets.KEY_STORE_KEY_PASS }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH: ${{ secrets.MODRINTH }}
CURSE: ${{ secrets.CURSE }}
run: ./gradlew publish
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu'

- name: Cache Gradle files
uses: actions/cache@v2
if: ${{ !env.ACT }}
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('*/build.gradle', '*/settings.gradle', '*gradle.*') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: |
publish
env:
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
KEY_STORE_ALIAS: ${{ secrets.KEY_STORE_ALIAS }}
KEY_STORE_KEY_PASS: ${{ secrets.KEY_STORE_KEY_PASS }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH: ${{ secrets.MODRINTH }}
CURSE: ${{ secrets.CURSE }}
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ buildscript {
}

plugins {
id 'fabric-loom' version '1.3.9'
id 'fabric-loom' version '1.3.+'
//id 'org.gradle.toolchains.foojay-resolver-convention' version "0.5.0"
//id "com.github.fudge.forgedflowerloom" version "2.0.0"
id 'io.github.juuxel.loom-vineflower' version '1.11.0'
id 'io.github.juuxel.loom-vineflower' version '1.+'
id 'maven-publish'
id "com.modrinth.minotaur" version "2.+"
id 'com.matthewprenger.cursegradle' version '1.4.+'
Expand Down

0 comments on commit 4636b78

Please sign in to comment.