diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cf85949..e072315 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,4 +39,5 @@ jobs: name: Artifacts path: build/libs/ env: + USERNAME: ${{ secrets.USERNAME }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 5863ef1..143bf45 100644 --- a/build.gradle +++ b/build.gradle @@ -92,24 +92,18 @@ publishing { // The repositories here will be used for publishing your artifact, not for // retrieving dependencies. maven { - name = "GitHubPackages" - url = "https://maven.pkg.github.com/Mystery2099/VoxLib" - String actor - String token def gitCreds = new Properties() def gitCredFile = new File("./gitlogin.properties") if (gitCredFile.exists()) { gitCreds.load(new FileInputStream(gitCredFile)) - actor = gitCreds.username - token = gitCreds.token - } - else { - actor = "Mystery2099" - token = System.getenv("GITHUB_TOKEN") } + + name = "GitHubPackages" + url = "https://maven.pkg.github.com/Mystery2099/VoxLib" + credentials { - username = actor - password = token + username = System.getenv("USERNAME") ?: gitCreds.username + password = System.getenv("GITHUB_TOKEN") ?: gitCreds.token } } }