From e71b3d0c95a254494dfe96c6716cb42682daca9a Mon Sep 17 00:00:00 2001 From: Julian Date: Wed, 15 Mar 2023 13:06:01 +0100 Subject: [PATCH] Move hardcoded server id to env --- .github/workflows/release.yml | 2 ++ .github/workflows/test.yml | 3 ++- src/test/java/GetFileTest.java | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07e2ceb..ef5c301 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,7 @@ jobs: run: ./gradlew build -Prelease=${{ github.ref_name }} --info env: EXAROTON_API_TOKEN: ${{ secrets.EXAROTON_API_KEY }} + EXAROTON_TEST_SERVER: "WgvSsfR8ZizUO1RQ" - name: Publish to Maven Central env: ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.EXAROTON_GPG_SIGNING_KEY }} @@ -26,6 +27,7 @@ jobs: ORG_GRADLE_PROJECT_OSSRH_USERNAME: ${{ secrets.SONATYPE_OSSRH_USERNAME }} ORG_GRADLE_PROJECT_OSSRH_PASSWORD: ${{ secrets.SONATYPE_OSSRH_PASSWORD }} EXAROTON_API_TOKEN: ${{ secrets.EXAROTON_API_KEY }} + EXAROTON_TEST_SERVER: "WgvSsfR8ZizUO1RQ" run: ./gradlew publish -Prelease=${{ github.ref_name }} - name: Create Release uses: softprops/action-gh-release@v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e67187b..bb7e3fe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,4 +17,5 @@ jobs: - name: Build with Gradle run: ./gradlew build --info env: - EXAROTON_API_TOKEN: ${{ secrets.EXAROTON_API_KEY }} \ No newline at end of file + EXAROTON_API_TOKEN: ${{ secrets.EXAROTON_API_KEY }} + EXAROTON_TEST_SERVER: "WgvSsfR8ZizUO1RQ" \ No newline at end of file diff --git a/src/test/java/GetFileTest.java b/src/test/java/GetFileTest.java index f471b60..89c55f8 100644 --- a/src/test/java/GetFileTest.java +++ b/src/test/java/GetFileTest.java @@ -19,7 +19,7 @@ public class GetFileTest { @Test void getFile() { - Server server = client.getServer("eY6o31lHct5tDcSJ"); + Server server = client.getServer(System.getenv("EXAROTON_TEST_SERVER")); assertDoesNotThrow(() -> { ServerFile whitelist = server.getFile("whitelist.json"); whitelist.putContent("[{\"name\":\"JulianVennen\", \"uuid\": \"abcd9e56-5ac2-490c-8bc9-6c1cad18f506\"}]");