Release CI #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release CI | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
release: | |
name: Publish Release | |
runs-on: macos-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup JAVA 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
- name: Cache Gradle and wrapper | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
- name: Inject Secrets | |
env: | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
FLAKER_GITHUB_MAVEN_PUBLISH: ${{ secrets.FLAKER_GITHUB_MAVEN_PUBLISH }} | |
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
run: | | |
touch secrets.properties | |
echo "SENTRY_DSN = $SENTRY_DSN" >> secrets.properties | |
echo "SIGNING_KEY_ALIAS = $SIGNING_KEY_ALIAS" >> secrets.properties | |
echo "SIGNING_KEY_PASSWORD = $SIGNING_KEY_PASSWORD" >> secrets.properties | |
echo "SIGNING_STORE_PASSWORD = $SIGNING_STORE_PASSWORD" >> secrets.properties | |
echo "GPR_USERNAME = rotbolt" >> secrets.properties | |
echo "GPR_TOKEN = $FLAKER_GITHUB_MAVEN_PUBLISH" >> secrets.properties | |
- name: Decode Keystore | |
env: | |
ENCODED_STRING: ${{ secrets.SIGNING_KEY_STORE }} | |
SIGNING_KEY_STORE_PATH: ${{ secrets.SIGNING_KEY_STORE_PATH }} | |
run: | | |
echo $ENCODED_STRING > keystore-b64.txt | |
base64 -d keystore-b64.txt > $SIGNING_KEY_STORE_PATH | |
- name: Publish Library packages to Maven Central | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_IN_MEMORY_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PUB_PASSWORD }} | |
run: ./gradlew publishAllPublicationsToMavenCentral --no-configuration-cache | |
- name: Build Sample apk (Debug and Release) | |
run: ./gradlew assemble | |
- name: Upload Sample App Debug and Release Builds to Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Sample App Builds | |
path: | | |
sampleapp/build/outputs/apk/debug/sampleapp-debug.apk | |
sampleapp/build/outputs/apk/release/sampleapp-release.apk | |
if-no-files-found: error | |