Skip to content
This repository has been archived by the owner on Jul 13, 2024. It is now read-only.

Commit

Permalink
Now test it
Browse files Browse the repository at this point in the history
  • Loading branch information
TonimatasDEV committed Mar 1, 2024
1 parent 5d8789c commit 61cfece
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 20 deletions.
78 changes: 58 additions & 20 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,61 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/[email protected]

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

- name: Give permissions to Gradle
run: chmod +x ./gradlew

- name: Export jar with Gradle
run: ./gradlew jar

- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: Mossy
path: build/libs/**.jar
- name: Checkout
uses: actions/[email protected]

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

- name: Give permissions to Gradle
run: chmod +x ./gradlew

- name: Export jar with Gradle
run: ./gradlew jar

- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: Mossy
path: build/libs/**.jar

- name: Put Mossy jar in an archive
working-directory: build/libs
run: |
tar -czf mossy.tar.gz mossy*.jar
mv mossy.tar.gz ../../
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: mossy-jar
path: |
mossy.tar.gz
test:
needs: build
runs-on: ubuntu-latest

steps:
- name: Setup Java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: mossy-jar
path: .

- name: Extract Mossy
run: |
tar -xvf mossy.tar.gz
- name: Run
timeout-minutes: 10
run: echo "stop" | java -jar mossy*.jar
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ plugins {
id("com.github.johnrengelman.shadow") version "7.1.0"
}

base.archivesName.set("mossy")

configurations {
libraries
}
Expand Down

0 comments on commit 61cfece

Please sign in to comment.