Skip to content

Commit

Permalink
Merge pull request #98 from velocitycareerlabs/fix/cert
Browse files Browse the repository at this point in the history
Fix/cert
  • Loading branch information
michaelavoyan authored Mar 6, 2024
2 parents 9ac9f0d + 0b049a8 commit f9ead71
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/android-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ env:
GRADLE_VERSION: "7.5"
JAVA_VERSION: "17"
ARTIFACT_PATH: "VCL/build/outputs"
ANDROID_NEXUS_SIGNING_KEY_ID: ${{ secrets.ANDROID_NEXUS_SIGNING_KEY_ID }}
ANDROID_NEXUS_SIGNING_PWD: ${{ secrets.ANDROID_NEXUS_SIGNING_PWD }}
ANDROID_NEXUS_OSSRH_USERNAME: ${{ secrets.ANDROID_NEXUS_OSSRH_USERNAME }}
ANDROID_NEXUS_OSSRH_PWD: ${{ secrets.ANDROID_NEXUS_OSSRH_PWD }}
ANDROID_NEXUS_STAGING_PROFILE_ID: ${{ secrets.ANDROID_NEXUS_STAGING_PROFILE_ID }}
ANDROID_NEXUS_PRIVATE_KEY: ${{ secrets.ANDROID_NEXUS_PRIVATE_KEY }}
GLOBAL_ENV: ${{ github.event_name == 'push' && format('{0}', 'dev') || inputs.environment }}

jobs:
Expand All @@ -36,7 +30,7 @@ jobs:
- name: Git clone repository
uses: actions/checkout@v4
# Setup java
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
Expand All @@ -52,7 +46,7 @@ jobs:
- name: Git clone repository
uses: actions/checkout@v4
# Setup java
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
Expand All @@ -69,16 +63,23 @@ jobs:
# Show Me Builded packages
- name: Show Me Builded packages
run: ls -al ${{ env.ARTIFACT_PATH}}/${{ env.PACKAGE_TYPE }}/
- name: Export Nexus Private Key
run: echo "signingPrivateKey=${{ secrets.ANDROID_NEXUS_PRIVATE_KEY }}" >> nexus.properties
# Publish Prod/Rc
- name: Publish Prod/Rc
if: ${{ env.GLOBAL_ENV == 'prod' || env.GLOBAL_ENV == 'rc' }}
run: ./gradlew publish${{ env.RELEASE_TAG }}
env:
RELEASE_TAG: ${{ env.GLOBAL_ENV == 'prod' && format('{0}', 'Release' ) || 'Rc' }}
ANDROID_NEXUS_OSSRH_USERNAME: ${{ secrets.ANDROID_NEXUS_OSSRH_USERNAME }}
ANDROID_NEXUS_OSSRH_PWD: ${{ secrets.ANDROID_NEXUS_OSSRH_PWD }}
ANDROID_NEXUS_SIGNING_KEY_ID: ${{ secrets.ANDROID_NEXUS_SIGNING_KEY_ID }}
ANDROID_NEXUS_SIGNING_PWD: ${{ secrets.ANDROID_NEXUS_SIGNING_PWD }}
ANDROID_NEXUS_STAGING_PROFILE_ID: ${{ secrets.ANDROID_NEXUS_STAGING_PROFILE_ID }}
# Upload Artifacts
- name: Upload Artifact
if: success()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: vcl-${{ env.RELEASE_TAG }}.${{ env.PACKAGE_TYPE }}
path: ${{ env.ARTIFACT_PATH }}/${{ env.PACKAGE_TYPE }}
Expand Down
12 changes: 11 additions & 1 deletion publish-core.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
def propertiesFilePath = '/Volumes/Keybase/team/velocitycareers/mobile/android/maven/nexus.properties'
def propertiesFilePath_alternative = 'nexus.properties'

def propertiesFile = new File(propertiesFilePath)
def propertiesFile_alternative = new File(propertiesFilePath_alternative)

def properties = new Properties()

if (propertiesFile.exists()) {
Expand All @@ -8,8 +12,14 @@ if (propertiesFile.exists()) {
} catch (IOException e) {
e.printStackTrace()
}
} else if (propertiesFile_alternative.exists()) {
try {
properties.load(new FileInputStream(propertiesFile_alternative))
} catch (IOException e) {
e.printStackTrace()
}
} else {
println "Properties file not found: $propertiesFilePath"
println "Properties file not found: $propertiesFilePath or $propertiesFilePath_alternative"
}

ext {
Expand Down

0 comments on commit f9ead71

Please sign in to comment.