diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 93b08b2..7129929 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,5 +22,5 @@ jobs: - name: Build with Gradle run: ./gradlew publish env: - bluecoloredUsername: ${{ secrets.BLUECOLORED_USERNAME }} - bluecoloredPassword: ${{ secrets.BLUECOLORED_PASSWORD }} + BLUECOLORED_USERNAME: ${{ secrets.BLUECOLORED_USERNAME }} + BLUECOLORED_PASSWORD: ${{ secrets.BLUECOLORED_PASSWORD }} diff --git a/build.gradle.kts b/build.gradle.kts index 2aa98f8..f62749f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -116,9 +116,9 @@ publishing { val snapshotsRepoUrl = "https://repo.bluecolored.de/snapshots" url = uri(if (version == lastVersion) releasesRepoUrl else snapshotsRepoUrl) - credentials(PasswordCredentials::class) - authentication { - create("basic") + credentials { + username = project.findProperty("bluecoloredUsername") as String? ?: System.getenv("BLUECOLORED_USERNAME") + password = project.findProperty("bluecoloredPassword") as String? ?: System.getenv("BLUECOLORED_PASSWORD") } } }