Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
juraj-hrivnak committed Nov 23, 2024
1 parent c0803c2 commit 05ce61d
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 67 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/Build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,13 @@ jobs:
distribution: 'zulu'
java-version: 17

- name: 📦 Build API docs using Dokka
uses: burrunan/gradle-cache-action@v1
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: wrapper
arguments: dokkaHtml
properties: |
org.gradle.vfs.watch=false
org.gradle.vfs.verbose=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: 📦 Build API docs using Dokka
run: ./gradlew dokkaHtml

- name: Upload API docs
uses: actions/upload-artifact@v4
Expand Down
65 changes: 21 additions & 44 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,15 @@ jobs:
distribution: 'zulu'
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: 📦 Build JVM Jar
uses: burrunan/gradle-cache-action@v1
with:
gradle-version: wrapper
arguments: jvmJar
properties: |
org.gradle.vfs.watch=false
org.gradle.vfs.verbose=false
gradle-distribution-sha-256-sum-warning: false
run: ./gradlew jvmJar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}

- name: Upload JVM Jar
uses: actions/upload-artifact@v4
Expand All @@ -77,17 +75,15 @@ jobs:
distribution: 'zulu'
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: 📦 Build JVM distZip
uses: burrunan/gradle-cache-action@v1
with:
gradle-version: wrapper
arguments: distZip
properties: |
org.gradle.vfs.watch=false
org.gradle.vfs.verbose=false
gradle-distribution-sha-256-sum-warning: false
run: ./gradlew distZip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}

- name: Upload JVM ZIP Distribution
uses: actions/upload-artifact@v4
Expand All @@ -108,17 +104,15 @@ jobs:
distribution: 'zulu'
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: 📦 Build JVM distTar
uses: burrunan/gradle-cache-action@v1
with:
gradle-version: wrapper
arguments: distTar
properties: |
org.gradle.vfs.watch=false
org.gradle.vfs.verbose=false
gradle-distribution-sha-256-sum-warning: false
run: ./gradlew distTar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}

- name: Upload JVM Tar Distribution
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -167,20 +161,3 @@ jobs:
jar/pakku.jar
dist/*.zip
dist/*.tar
close-fixed-issues:
name: Close Fixed Issues
runs-on: ubuntu-latest
needs: [release]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: close-fixed-in-dev
uses: juraj-hrivnak/close-issues-based-on-label@master
env:
LABEL: "fixed in dev"
VERSION: ${{ github.ref_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=true -Dkotlin.incremental=false -Dorg.gradle.project.kotlin.incremental.multiplatform=false -Dorg.gradle.project.kotlin.native.disableCompilerDaemon=true -Dorg.gradle.jvmargs="-Xmx5g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
11 changes: 6 additions & 5 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Publish to GitHub Packages
run: ./gradlew publish -PsnapshotVersion
Expand All @@ -59,13 +61,12 @@ jobs:
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Publish to GitHub Packages
run: ./gradlew publish
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=true -Dkotlin.incremental=false -Dorg.gradle.project.kotlin.incremental.multiplatform=false -Dorg.gradle.project.kotlin.native.disableCompilerDaemon=true -Dorg.gradle.jvmargs="-Xmx5g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
33 changes: 24 additions & 9 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,22 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- uses: gradle/actions/setup-gradle@v4

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- run: ./gradlew jvmTest --stacktrace

- name: Upload the build report
if: failure()
uses: actions/upload-artifact@v4
Expand All @@ -31,18 +40,24 @@ jobs:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- uses: gradle/actions/setup-gradle@v4

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- run: ./gradlew jvmJar

- name: Upload JVM Jar
uses: actions/upload-artifact@v4
with:
name: jvm-jar
path: build/libs/pakku.jar

env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=true -Dkotlin.incremental=false -Dorg.gradle.project.kotlin.incremental.multiplatform=false -Dorg.gradle.project.kotlin.native.disableCompilerDaemon=true -Dorg.gradle.jvmargs="-Xmx5g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"

0 comments on commit 05ce61d

Please sign in to comment.