update publishing

This commit is contained in:
FalsePattern committed 2022-07-01 19:22:58 +02:00
1 parent 4cdc933192
commit d3d6e73f68
2 files changed
+11 -16

No files matched your search

+4 -4
View File
@@ -11,9 +11,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
steps:
- uses: actions/checkout@v2
with:
@@ -48,4 +45,7 @@ jobs:
files: build/libs/*.jar
- name: Publish to maven
run: ./gradlew publish
run: ./gradlew publish
env:
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
+7 -12
View File
@@ -1,4 +1,4 @@
//version: 1656003793falsepattern25
//version: 1656003793falsepattern26
/*
DO NOT CHANGE THIS FILE!
@@ -614,23 +614,18 @@ def getMavenSettingsCredentials = {
}
def getCredentials = {
try {
String username = System.getenv("MAVEN_DEPLOY_USER")
String password = System.getenv("MAVEN_DEPLOY_PASSWORD")
if (username == null || password == null) {
def entries = getMavenSettingsCredentials()
for (entry in entries) {
if (entry."id".text() == repositoryName) {
return [username: entry.username.text(), password: entry.password.text()]
}
}
throw new Exception();
} catch (Exception ignored) {
//Try from environment variables if file does not exist
String username = System.getenv("MAVEN_DEPLOY_USER")
String password = System.getenv("MAVEN_DEPLOY_PASSWORD")
if (username == null || password == null) {
return [username: null, password: null]
} else {
return [username: username, password: password]
}
return [username: null, password: null]
} else {
return [username: username, password: password]
}
}