feat: Add internal and production track to release into PlayStore on CD #66
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 | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get tag version | |
id: get_version | |
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT | |
- name: Set up environment | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
- name: Gradle cache | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.0.2 | |
bundler-cache: true | |
# - name: Gradle build | |
# run: ./gradlew build | |
# env: | |
# GH_DRIVER_REPOSITORY_USERNAME: ${{ secrets.GH_DRIVER_REPOSITORY_USERNAME }} | |
# GH_DRIVER_REPOSITORY_TOKEN: ${{ secrets.GH_DRIVER_REPOSITORY_TOKEN }} | |
# - name: Publish the library to MavenCentral | |
# run: ./gradlew publish | |
# env: | |
# OSSRH_LOGIN: ${{ secrets.OSSRH_LOGIN }} | |
# OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
# SIGN_KEYID: ${{ secrets.SIGN_KEYID }} | |
# SIGN_KEY: ${{ secrets.SIGN_KEY }} | |
# SIGN_PASSWORD: ${{ secrets.SIGN_PASSWORD }} | |
# LIB_VERSION: ${{ steps.get_version.outputs.VERSION }} | |
# GH_DRIVER_REPOSITORY_USERNAME: ${{ secrets.GH_DRIVER_REPOSITORY_USERNAME }} | |
# GH_DRIVER_REPOSITORY_TOKEN: ${{ secrets.GH_DRIVER_REPOSITORY_TOKEN }} | |
# - name: Rename the AAR file for GitHub release upload | |
# run: mv enioka_scan/build/outputs/aar/enioka_scan-release.aar enioka_scan/build/outputs/aar/enioka_scan-${{ steps.get_version.outputs.VERSION }}.aar | |
# - name: Create a GitHub release with the AAR file as an asset | |
# uses: softprops/action-gh-release@v2 | |
# with: | |
# name: ${{ steps.get_version.outputs.VERSION }} | |
# files: enioka_scan/build/outputs/aar/enioka_scan-${{ steps.get_version.outputs.VERSION }}.aar | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Restore json key | |
run: echo "${{ secrets.GOOGLE_API_PUB_JSON_BASE64 }}" | base64 --decode > ${{ github.workspace }}/service-account.json | |
- name: Restore keystore | |
run: echo "${{ secrets.GOOGLE_KEYSTORE_BASE64 }}" | base64 --decode > ${{ github.workspace }}/demoscannerapp/debug.keystore | |
- name: Fastlane build and upload | |
run: bundle exec fastlane internal | |
env: | |
KEYSTORE_PASSWORD: ${{ secrets.GOOGLE_KEYSTORE_PASSWORD }} | |
SIGNKEY_PASSWORD: ${{ secrets.GOOGLE_SIGNKEY_PASSWORD }} | |
KEY_ALIAS: ${{ secrets.GOOGLE_SIGNKEY_ALIAS }} | |
- name: Gradle build | |
run: ./gradlew demoscannerapp:bundleRelease | |
- name: Upload aab as artefact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: app-release | |
path: ${{ github.workspace }}/demoscannerapp/build/outputs/bundle/debug/release/demoscannerapp-debug.aab |