Skip to content

Commit

Permalink
Updated publishing process
Browse files Browse the repository at this point in the history
  • Loading branch information
Voinea-Radu committed Oct 25, 2024
1 parent b802f34 commit 95582ac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ jobs:
run: |
mkdir -p ~/.gradle
echo "
com.voinearadu.url=https://repository.voinearadu.com/repository/maven-releases/
com.voinearadu.auth.username=admin
com.voinearadu.auth.password=${{ secrets.NEXUS_PASSWORD }}
generic.url=${{ secrets.NEXUS_URL }}
generic.auth.username=${{ secrets.NEXUS_USERNAME }}
generic.auth.password=${{ secrets.NEXUS_PASSWORD }}
" > ~/.gradle/gradle.properties
if [ "${{ secrets.NEXUS_PASSWORD }}" == "" ]; then echo "com.voinearadu.publish=false" >> ~/.gradle/gradle.properties; fi
if [ "${{ secrets.NEXUS_PASSWORD }}" == "" ]; then echo "generic.publish=false" >> ~/.gradle/gradle.properties; fi
- name: Cache Gradle Dependencies
uses: actions/cache@v4
Expand Down
11 changes: 9 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ group = libs.versions.group.get()
version = libs.versions.version.get()

repositories {
println(project.properties["com.voinearadu.publish"])

mavenCentral()
maven("https://repository.voinearadu.dev/repository/maven-releases/")
}
Expand Down Expand Up @@ -75,6 +73,15 @@ publishing {
}
}
}
if (project.properties["generic.publish"] == "true") {
maven(url = (project.findProperty("generic.url") ?: "") as String) {
name = "GenericRepository"
credentials(PasswordCredentials::class) {
username = (project.findProperty("generic.auth.username") ?: "") as String
password = (project.findProperty("generic.auth.password") ?: "") as String
}
}
}
}
}

0 comments on commit 95582ac

Please sign in to comment.