Skip to content

Merge pull request #190 from NordicSemiconductor/feature/suit-push #39

Merge pull request #190 from NordicSemiconductor/feature/suit-push

Merge pull request #190 from NordicSemiconductor/feature/suit-push #39

Workflow file for this run

name: Deploy to Google Play Internal & Nexus
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
generateReadme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '17'
- shell: bash
# The script gets VERSION from the latest tag and replaces {{VERSION}} with it in
# moustache/README.mo. Then, it commits the change using GitHub Action user.
run: |
git config user.email [email protected]
git config user.name "Github Action"
VERSION=`git describe --tags --abbrev=0`
VERSION=`./moustache/split.sh $VERSION`
rm -f ./README.md
VERSION=$VERSION ./moustache/mo ./moustache/README.mo > ./README.md
git add .
git diff-index --quiet HEAD || git commit -m "Update readme to version=$VERSION" && git push
deployAabToGooglePlayInternal:
needs: generateReadme
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '17'
- shell: bash
env:
# The following env variables are used by signing configuration in sample/build.gradle
KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
KEYSTORE_KEY_PSWD: ${{ secrets.KEYSTORE_KEY_PSWD }}
KEYSTORE_PSWD: ${{ secrets.KEYSTORE_PSWD }}
# The script decodes keystore (required by sample/build.gradle) and fastlane-api.json
# needed by fastlane (see fastlane/Appfile).
run: |
echo "${{ secrets.KEYSTORE_FILE }}" > keystore.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_FILE_PSWD }}" --batch keystore.asc > keystore
echo "${{ secrets.API_KEY_FILE }}" > fastlane-api.json.asc
gpg -d --passphrase "${{ secrets.API_KEY_FILE_PSWD }}" --batch fastlane-api.json.asc > fastlane-api.json
fastlane deployInternal
deployAarsToNexus:
needs: generateReadme
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '17'
- shell: bash
env:
# The following env variables are used by gradle/publish-module.gradle
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
# The following env variables are used by gradle/publish-root.gradle
OSSR_USERNAME: ${{ secrets.OSSR_USERNAME }}
OSSR_PASSWORD: ${{ secrets.OSSR_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
# The script generates sec.gpg file that is required by gradle/publish-module.gradle
# and starts :deployNexus lane using fastlane.
run: |
echo "${{ secrets.GPG_FILE }}" > sec.gpg.asc
gpg -d --passphrase "${{ secrets.GPG_FILE_PSWD }}" --batch sec.gpg.asc > sec.gpg
fastlane deployNexus