-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from AppsFlyerSDK/releases/6.x.x/6.10.x/6.10.3…
…-rc1 Releases/6.x.x/6.10.x/6.10.3 rc1
- Loading branch information
Showing
14 changed files
with
247 additions
and
19 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,23 @@ | ||
#!/bin/bash | ||
|
||
appsflyerversion=$1 | ||
rc=$2 | ||
|
||
sed -E -i '' "s/(.*af-android-sdk:)([0-9]+\.[0-9]+\.[0-9]+)'/\1$appsflyerversion\'/g" app/build.gradle | ||
|
||
sed -E -i '' "s/(.*af-android-sdk:)([0-9]+\.[0-9]+\.[0-9]+)'/\1$appsflyerversion\'/g" segmenttestapp/build.gradle | ||
|
||
version_code=$(grep -E 'VERSION_CODE=([0-9]+)' gradle.properties | grep -o '[0-9]\+') | ||
version_code=$((version_code+1)) | ||
sed -E -i '' "s/VERSION_CODE=([0-9]+)/VERSION_CODE=$version_code/g" gradle.properties | ||
|
||
sed -E -i '' "s/VERSION_NAME=([0-9]+\.[0-9]+\.[0-9]+)/VERSION_NAME=$appsflyerversion-rc$rc/g" gradle.properties | ||
|
||
sed -E -i '' "s/(POM_ARTIFACT_ID=.*)/\1-beta/g" gradle.properties | ||
|
||
sed -E -i '' "s/(Built with AppsFlyer Android SDK.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)/\1$appsflyerversion\3/g" Readme.md | ||
sed -E -i '' "s/(.*appsflyer:segment-android-integration:)([0-9]+\.[0-9]+\.[0-9]+)(.*)/\1$appsflyerversion\3/g" Readme.md | ||
|
||
sed -E -i '' "s/(.*setPluginInfo.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)/\1$appsflyerversion\3/g" app/src/main/java/com/segment/analytics/android/integrations/appsflyer/AppsflyerIntegration.java | ||
|
||
touch "releasenotes.$appsflyerversion" |
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,14 @@ | ||
#!/bin/bash | ||
|
||
releaseversion=$1 | ||
|
||
sed -i '' 's/^/* /' "releasenotes.$releaseversion" | ||
NEW_VERSION_RELEASE_NOTES=$(cat "releasenotes.$releaseversion") | ||
NEW_VERSION_SECTION="### $releaseversion\n$NEW_VERSION_RELEASE_NOTES\n\n" | ||
echo -e "$NEW_VERSION_SECTION$(cat RELEASENOTES.md)" > RELEASENOTES.md | ||
|
||
rm -r "releasenotes.$releaseversion" | ||
|
||
sed -E -i '' "s/VERSION_NAME=([0-9]+\.[0-9]+\.[0-9]+).*/VERSION_NAME=$releaseversion/g" gradle.properties | ||
|
||
sed -E -i '' "s/(POM_ARTIFACT_ID=.*)-beta/\1/g" gradle.properties |
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,51 @@ | ||
name: pre-release | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
Change-HardCoded-Version: | ||
name: Pre Release | ||
runs-on: | ||
- self-hosted | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Determine release tag and release branch | ||
run: | | ||
TAG=$(echo "${{github.ref_name}}" | grep -Eo '[0-9]+.[0-9]+.[0-9]+') | ||
RC=$(echo "${{github.ref_name}}" | grep -Eo '[0-9]+$') | ||
echo "PLUGIN_VERSION=$TAG" >> $GITHUB_ENV | ||
echo "RC_NUMBER=$RC" >> $GITHUB_ENV | ||
- name: run script | ||
run: bash .github/bash_scripts/pre_release.sh ${{env.PLUGIN_VERSION}} ${{env.RC_NUMBER}} | ||
- name: Commit changes | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
author_name: Moris Gateno | ||
author_email: [email protected] | ||
message: 'Commited from github action - prepaing the repo for QA.' | ||
add: '.' | ||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
- name: Grant execute permission for gradlew | ||
run: | | ||
chmod +x ./gradlew | ||
- name: Publish package to QA (-Beta) | ||
run: | | ||
./gradlew publish | ||
- name: Notify with Slack | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"appsflyer_version": "${{env.PLUGIN_VERSION}}", | ||
"environment": "QA" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.CI_SLACK_WEBHOOK_URL }} | ||
|
||
|
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,35 @@ | ||
name: Prepare plugin for production | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
branches: | ||
- 'master' | ||
# - 'dev/add-release-workflow' | ||
|
||
jobs: | ||
Prepare-Plugin-For-Production: | ||
if: startsWith(github.head_ref, 'releases/') | ||
name: Prepare for production after testing the plugin | ||
runs-on: | ||
- self-hosted | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: PR branch check | ||
uses: mdecoleman/[email protected] | ||
id: vars | ||
with: | ||
repo-token: ${{ secrets.CI_GITHUB_TOKEN }} | ||
- name: Determine release tag and release branch | ||
run: | | ||
TAG=$(echo "${{ steps.vars.outputs.branch }}" | grep -Eo '[0-9]+.[0-9]+.[0-9]+') | ||
echo "PLUGIN_VERSION=$TAG" >> $GITHUB_ENV | ||
- name: run script | ||
run: bash .github/bash_scripts/release.sh ${{env.PLUGIN_VERSION}} | ||
- name: Commit and Push | ||
run : | | ||
git add . | ||
git commit -m"Commited from github action - prepaing the repo for production." | ||
git push origin HEAD:${{ steps.vars.outputs.branch }} --force |
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,34 @@ | ||
|
||
name: Release plugin to QA | ||
|
||
on: | ||
push: | ||
branches: | ||
- releases/[0-9]+.x.x/[0-9]+.[0-9]+.x/[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ | ||
|
||
jobs: | ||
Check-If-ReleaseNotes-Pushed: | ||
runs-on: | ||
- self-hosted | ||
outputs: | ||
answer: ${{ steps.filter.outputs.releasenotesfile }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: | | ||
releasenotesfile: | ||
- 'releasenotes.**' | ||
Run-Unit-Tests: | ||
needs: Check-If-ReleaseNotes-Pushed | ||
if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' | ||
uses: ./.github/workflows/unit-tests-workflow.yml | ||
secrets: inherit | ||
|
||
Deploy-Locally-To-QA: | ||
needs: [Run-Unit-Tests,Check-If-ReleaseNotes-Pushed] | ||
if: needs.Check-If-ReleaseNotes-Pushed.outputs.answer == 'false' | ||
uses: ./.github/workflows/prepare-for-QA-release.yml | ||
secrets: inherit |
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,68 @@ | ||
name: Release plugin to production | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- 'master' | ||
# - 'dev/add-release-workflow' | ||
|
||
jobs: | ||
Deploy-To-Production: | ||
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/') | ||
runs-on: | ||
- self-hosted | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: PR branch check | ||
uses: mdecoleman/[email protected] | ||
id: vars | ||
with: | ||
repo-token: ${{ secrets.CI_GITHUB_TOKEN }} | ||
- name: Determine release tag and release branch | ||
run: | | ||
TAG=$(echo "${{ steps.vars.outputs.branch }}" | grep -Eo '[0-9]+.[0-9]+.[0-9]+') | ||
echo "PLUGIN_VERSION=$TAG" >> $GITHUB_ENV | ||
echo "RELEASE_BRANCH_NAME=${{ steps.vars.outputs.branch }}" >> $GITHUB_ENV | ||
echo "push new release >> $TAG" | ||
- name: Create release and tag | ||
env: | ||
TAG: ${{env.PLUGIN_VERSION}} | ||
uses: "actions/github-script@v5" | ||
with: | ||
script: | | ||
try { | ||
await github.rest.repos.createRelease({ | ||
draft: false, | ||
generate_release_notes: false, | ||
name: process.env.TAG, | ||
owner: context.repo.owner, | ||
prerelease: false, | ||
repo: context.repo.repo, | ||
tag_name: process.env.TAG | ||
}); | ||
} catch (error) { | ||
core.setFailed(error.message); | ||
} | ||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
- name: Grant execute permission for gradlew | ||
run: | | ||
chmod +x ./gradlew | ||
- name: Publish package | ||
run: | | ||
./gradlew publish | ||
- name: Notify with Slack | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"appsflyer_version": "${{env.PLUGIN_VERSION}}", | ||
"environment": "Production" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.CI_SLACK_WEBHOOK_URL }} |
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
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