# This job is equivalent to the old jenkins jobs android-sdk-release and android-sdk-release-tags-and-docs
# They were merged here as for a normal Android release we want to run both these jobs together always anyway.
# WARNING: This job pushes to the public GitHub, only run this to perform a release from a relevant release tag.
release:
    name: Android SDK Release
    agent: 
        type: Unity::VM
        image: mobile/android-linux-build:latest
        flavor: i1.large
    commands:
        - ./gradlew clean build check uploadArchives
        - ./docsAndTags.sh
    artifacts:
        packages:
            paths:
                - "**/outputs/aar/*.aar"
                - "**/libs/*.jar"
                - "**/outputs/apk/*.apk"


# This job is equivalent to the old jenkins jobs android-sdk-release and android-sdk-release-tags-and-docs
# They were merged here as for a normal Android release we want to run both these jobs together always anyway.
# WARNING: This job pushes to the public GitHub, only run this to perform a release from a relevant release tag.
release:
    name: Android SDK Release
    agent: 
        type: Unity::VM
        image: mobile/android-linux-build:latest
        flavor: i1.large
    variables:
        ARTIFACTORY_URL: artifactory.deltadna.net
    commands:
        - ./gradlew -PSNAPSHOT_REPOSITORY_URL=https://https://artifactory.deltadna.net/artifactory/deltadna-repo -PMAVEN_SNAPSHOT_USERNAME=$MAVEN_SNAPSHOT_USERNAME -PMAVEN_SNAPSHOT_PASSWORD=$MAVEN_SNAPSHOT_PASSWORD -PRELEASE_REPOSITORY_URL=https://api.bintray.com/maven/deltadna/android/deltadna-sdk/;publish=1 -PMAVEN_RELEASE_USERNAME=$MAVEN_RELEASE_USERNAME -PMAVEN_RELEASE_PASSWORD=$MAVEN_RELEASE_PASSWORD clean build check uploadArchives
        - ./docsAndTags.sh
    artifacts:
        packages:
            paths:
                - "**/outputs/aar/*.aar"
                - "**/libs/*.jar"
                - "**/outputs/apk/*.apk"


Update YAML to use secrets
DDSDK: Update YAML to use secrets
