mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-20 14:39:47 +00:00
update publishing
This commit is contained in:
2 files changed
+11
-16
No files matched your search
@@ -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
@@ -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]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user