Release - Nightly Release to Internal and Firebase #19
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 - Nightly Release to Internal and Firebase | |
on: | |
schedule: | |
- cron: '0 2 * * *' # run at 3 AM UTC | |
workflow_dispatch: | |
env: | |
ASANA_PAT: ${{ secrets.GH_ASANA_SECRET }} | |
GOOGLE_APPLICATION_CREDENTIALS: '#{ENV["HOME"]}/jenkins_static/com.duckduckgo.mobile.android/ddg-upload-firebase.json' | |
GH_TOKEN: ${{ secrets.GT_DAXMOBILE }} | |
jobs: | |
create-tag: | |
name: Generate and upload nightly bundle to Play Store Internal track | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
token: ${{ secrets.GT_DAXMOBILE }} | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Set up ruby env | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7.2 | |
bundler-cache: true | |
- name: Set up git config | |
run: | | |
git remote set-url origin https://${{ secrets.GT_DAXMOBILE }}@github.com/duckduckgo/Android.git/ | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Get latest tag | |
id: get_latest_tag | |
run: | | |
output=$(git describe --tags --abbrev=0) | |
echo "Latest tag: $output" | |
echo "latest_tag=$output" >> $GITHUB_OUTPUT | |
- name: Decode upload keys | |
uses: davidSchuppa/base64Secret-toFile-action@199e78f212c854d2284fada7f3cd3aba3e37d208 | |
with: | |
secret: ${{ secrets.UPLOAD_RELEASE_PROPERTIES }} | |
fileName: ddg_android_build_upload.properties | |
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/ | |
- name: Decode key file | |
uses: davidSchuppa/base64Secret-toFile-action@199e78f212c854d2284fada7f3cd3aba3e37d208 | |
with: | |
secret: ${{ secrets.UPLOAD_RELEASE_KEY }} | |
fileName: ddg-upload-keystore.jks | |
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/ | |
- name: Decode Play Store credentials file | |
uses: davidSchuppa/base64Secret-toFile-action@199e78f212c854d2284fada7f3cd3aba3e37d208 | |
with: | |
secret: ${{ secrets.UPLOAD_PLAY_CREDENTIALS }} | |
fileName: api.json | |
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/ | |
- name: Decode Firebase credentials file | |
uses: davidSchuppa/base64Secret-toFile-action@199e78f212c854d2284fada7f3cd3aba3e37d208 | |
with: | |
secret: ${{ secrets.UPLOAD_FIREBASE_CREDENTIALS }} | |
fileName: ddg-upload-firebase.json | |
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/ | |
- name: Generate nightly version name | |
id: generate_version_name | |
run: | | |
output=$(gradle getBuildVersionName -PversionNameSuffix=-nightly -PlatestTag=${{ steps.get_latest_tag.outputs.latest_tag }} --quiet | tail -n 1) | |
echo "version=$output" >> $GITHUB_OUTPUT | |
- name: Tag Nightly release | |
id: tag_nightly_release | |
run: | | |
git checkout develop | |
git tag -a ${{ steps.generate_version_name.outputs.version }} -m "Create tag ${{ steps.generate_version_name.outputs.version }} for nightly release." | |
git push origin ${{ steps.generate_version_name.outputs.version }} |