Merge pull request #25 from nevissecurity/feature/NEVISACCESSAPP-6262… #63
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: Main Branch Commit | |
on: | |
push: | |
branches: [ 'main' ] | |
schedule: | |
# At 5:30 am on the 1st and 15th day of the month (every two weeks) | |
- cron: '30 5 1,15 * *' | |
workflow_dispatch: | |
env: | |
JAVA_VERSION: '17' | |
RUBY_VERSION: '3.0' | |
CURRENT_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
jobs: | |
build_and_tag: | |
name: Build and Tag | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository under $GITHUB_WORKSPACE | |
- name: Checkout Project | |
uses: actions/checkout@v4 | |
# Set Ruby version and Cache RubyGem dependencies | |
- name: Cache RubyGem Dependencies | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ env.RUBY_VERSION }} | |
bundler-cache: true | |
# Ensure correct Java version is installed | |
- name: Setup Java JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ env.JAVA_VERSION }} | |
# Move the Java keystore to its place | |
- name: Decode Keystore | |
uses: timheuer/base64-to-file@v1 | |
with: | |
fileName: 'keystore-example-app.jks' | |
fileDir: './etc' | |
encodedString: ${{ secrets.KEYSTORE_FILE }} | |
# Generate build number based on Git tag | |
- name: Generate build number | |
uses: onyxmueller/build-tag-number@v1 | |
with: | |
token: ${{secrets.GITHUB_TOKEN}} | |
# Setup Git user to make Fastlane capable to create Git tags | |
- uses: fregante/setup-git-user@v2 | |
# Build the Android app | |
- name: Run Fastlane | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SIGNING_CONFIGS: ${{ secrets.SIGNING_CONFIGS }} | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }} | |
GITHUB_USERNAME: ${{ secrets.GH_USERNAME }} | |
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
uses: maierj/[email protected] | |
with: | |
lane: 'main' | |
options: '{ "host_name": "${{ secrets.HOST_NAME }}", | |
"custom_uri_scheme": "${{ secrets.CUSTOM_URI_SCHEME }}" | |
}' |