-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into rehan/push-click-behavior
- Loading branch information
Showing
45 changed files
with
325 additions
and
684 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Setup Android | ||
description: Setup CI with Android development tools to compile and test Android source code. | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Install Android SDK | ||
uses: android-actions/setup-android@v3 | ||
|
||
- name: Verify gradle scripts are valid gradle scripts | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Setup Gradle and cache dependencies between builds | ||
uses: gradle/gradle-build-action@v2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Dependabot helps update dependencies to keep them up-to-date. | ||
# Configuration docs: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 1 | ||
reviewers: | ||
- "customerio/mobile" | ||
commit-message: | ||
prefix: "chore" | ||
include: "scope" | ||
groups: | ||
github-action-dependencies: | ||
patterns: | ||
- "*" |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Manual Deploy to Maven Central | ||
# Trigger this manual deployment in scenarios where: | ||
# A git tag exists, but the initial deployment failed and fix has been pushed to main. | ||
# This avoids the need to recreate the tag for redeployment. | ||
on: | ||
workflow_dispatch: # allows for manual triggering | ||
|
||
jobs: | ||
deploy-sonatype: | ||
name: Deploy SDK to Maven Central | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
fetch-depth: 0 # fetches all history for all tags and branches | ||
|
||
- name: Get latest tag | ||
id: get-latest-tag | ||
run: | | ||
echo '::group::Get latest tag' | ||
TAG=$(git describe --tags --abbrev=0) | ||
echo "TAG=$TAG" >> $GITHUB_ENV | ||
echo '::endgroup::' | ||
- uses: ./.github/actions/setup-android | ||
|
||
- name: Push to Sonatype servers | ||
run: MODULE_VERSION=${{ env.TAG }} ./scripts/deploy-code.sh | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.GRADLE_PUBLISH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.GRADLE_PUBLISH_PASSWORD }} | ||
SIGNING_KEY_ID: ${{ secrets.GRADLE_SIGNING_KEYID }} | ||
SIGNING_PASSWORD: ${{ secrets.GRADLE_SIGNING_PASSPHRASE }} | ||
SIGNING_KEY: ${{ secrets.GRADLE_SIGNING_PRIVATE_KEY }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
|
||
- name: Notify team of successful deployment | ||
uses: slackapi/[email protected] | ||
if: ${{ success() }} | ||
with: | ||
payload: | | ||
{ | ||
"text": "Android SDK deployed to Maven Central", | ||
"username": "Android deployment bot", | ||
"icon_url": "https://media.pocketgamer.com/artwork/na-qulrguj/android.jpg", | ||
"channel": "#mobile-deployments", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*Android* SDK deployed to Maven Central! (manual deployment)" | ||
} | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*Version:* ${{ env.TAG }}\n\nAndroid SDK deployment progress:\n~1. Git tag already created~\n~2. Manual deploy to maven central~\n\n" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_RELEASES_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | ||
- name: Notify team of failure | ||
uses: slackapi/[email protected] | ||
if: ${{ failure() }} | ||
with: | ||
payload: | | ||
{ | ||
"text": "Android SDK deployment failure", | ||
"username": "Android deployment bot", | ||
"icon_url": "https://media.pocketgamer.com/artwork/na-qulrguj/android.jpg", | ||
"channel": "#mobile-deployments", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*Android* SDK deployment :warning: failure :warning:" | ||
} | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "Android SDK failed deployment during step *deploy to maven central*. View <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|CI server logs> to learn why and fix the issue. <https://github.com/customerio/mobile/blob/main/GIT-WORKFLOW.md|Learn more about the deployment process and how to fix errors>." | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_RELEASES_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |
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
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
Oops, something went wrong.