Skip to content

Commit

Permalink
Move hardcoded server id to env
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianVennen committed Mar 15, 2023
1 parent f7779b6 commit e71b3d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ 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 }}
ORG_GRADLE_PROJECT_SIGNING_PASSPHRASE: ${{ secrets.EXAROTON_GPG_SIGNING_PASSPHRASE }}
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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ jobs:
- name: Build with Gradle
run: ./gradlew build --info
env:
EXAROTON_API_TOKEN: ${{ secrets.EXAROTON_API_KEY }}
EXAROTON_API_TOKEN: ${{ secrets.EXAROTON_API_KEY }}
EXAROTON_TEST_SERVER: "WgvSsfR8ZizUO1RQ"
2 changes: 1 addition & 1 deletion src/test/java/GetFileTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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\"}]");
Expand Down

0 comments on commit e71b3d0

Please sign in to comment.