Skip to content

Commit

Permalink
now using a secret for the username
Browse files Browse the repository at this point in the history
  • Loading branch information
Mystery2099 committed Dec 2, 2023
1 parent 37120d7 commit 1d17b16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ jobs:
name: Artifacts
path: build/libs/
env:
USERNAME: ${{ secrets.USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 6 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down

0 comments on commit 1d17b16

Please sign in to comment.