-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/audit-af-sdk
- Loading branch information
Showing
46 changed files
with
2,185 additions
and
37 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,14 @@ | ||
**Fixes** # (*issue*) | ||
|
||
## Type of change | ||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
- [ ] This change requires a documentation update | ||
## Checklist: | ||
- [ ] Version upgraded (project, README, gradle, podspec etc) | ||
- [ ] My code follows the style guidelines of this project | ||
- [ ] I have performed a self-review of my own code | ||
- [ ] I have commented my code, particularly in hard-to-understand areas | ||
- [ ] I have added unit tests for the code | ||
- [ ] I have made corresponding changes to the documentation |
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,83 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ 'master' ] | ||
pull_request: | ||
branches: [ 'master' ] | ||
types: [ 'opened', 'reopened', 'edited', 'synchronize' ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
cancel_previous: | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: styfle/cancel-workflow-action@0.9.1 | ||
with: | ||
workflow_id: ${{ github.event.workflow.id }} | ||
|
||
appsflyer-test: | ||
needs: cancel_previous | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: cache gradle dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-core-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle-core- | ||
- name: Run Tests | ||
run: ./gradlew appsflyer:test | ||
# - name: Generate coverage report | ||
# run: ./gradlew appsflyer:codeCoverageReport | ||
# - name: Upload coverage to Codecov | ||
# uses: codecov/codecov-action@v2 | ||
|
||
# android-test: | ||
# needs: cancel_previous | ||
# runs-on: ubuntu-latest | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Grant execute permission for gradlew | ||
# run: chmod +x gradlew | ||
# - name: cache gradle dependencies | ||
# uses: actions/cache@v2 | ||
# with: | ||
# path: | | ||
# ~/.gradle/caches | ||
# ~/.gradle/wrapper | ||
# key: ${{ runner.os }}-gradle-android-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-gradle-android- | ||
# - name: Run Tests | ||
# run: ./gradlew android:test | ||
# - name: Generate coverage report | ||
# run: ./gradlew android:codeCoverageReport | ||
# - name: Upload coverage to Codecov | ||
# uses: codecov/codecov-action@v2 | ||
|
||
# security: | ||
# needs: cancel_previous | ||
# runs-on: ubuntu-latest | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Grant execute permission for gradlew | ||
# run: chmod +x gradlew | ||
# - name: Snyk | ||
# run: ./gradlew snyk-test | ||
# env: | ||
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
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,16 @@ | ||
name: Check PR title | ||
on: | ||
pull_request: | ||
branches: ['master'] | ||
types: ['opened', 'reopened', 'edited', 'synchronize'] | ||
|
||
jobs: | ||
check_pr_title: | ||
name: Check PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check PR title | ||
uses: rudderlabs/github-action-check-pr-title@v1.0.7 |
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,77 @@ | ||
name: Draft new release | ||
|
||
on: | ||
workflow_dispatch | ||
|
||
jobs: | ||
draft-new-release: | ||
name: Draft a new release | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/heads/feat/') || startsWith(github.ref, 'refs/heads/fix/') | ||
steps: | ||
- name: Checkout source branch | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set Node 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
# In order to make a commit, we need to initialize a user. | ||
# You may choose to write something less generic here if you want, it doesn't matter functionality wise. | ||
- name: Initialize mandatory git config | ||
run: | | ||
git config user.name "GitHub actions" | ||
git config user.email noreply@github.com | ||
# Calculate the next release version based on conventional semantic release | ||
- name: Create release branch | ||
id: create-release | ||
run: | | ||
source_branch_name=${GITHUB_REF##*/} | ||
release_type=release | ||
git fetch origin master --depth=1 | ||
git merge origin/master | ||
current_version=$(cat gradle.properties | grep "VERSION_NAME" | cut -d'=' -f2) | ||
npm ci | ||
npx standard-version --skip.commit --skip.tag --skip.changelog | ||
new_version=$(cat gradle.properties | grep "VERSION_NAME" | cut -d'=' -f2) | ||
git reset --hard | ||
branch_name="${release_type}/${new_version}" | ||
echo "Source branch for new release is $source_branch_name" | ||
echo "Current version is $current_version" | ||
echo "Release type is $release_type" | ||
echo "New version is $new_version" | ||
echo "New release branch name is $branch_name" | ||
git checkout -b "$branch_name" | ||
git push --set-upstream origin "$branch_name" | ||
echo "source_branch_name=$source_branch_name" >> $GITHUB_OUTPUT | ||
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT | ||
echo "new_version=$new_version" >> $GITHUB_OUTPUT | ||
- name: Update changelog & bump version | ||
id: finish-release | ||
run: | | ||
npm ci | ||
npx standard-version -a --skip.tag | ||
- name: Push new version in release branch | ||
run: | | ||
git push | ||
- name: Create pull request into master | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
source_branch: ${{ steps.create-release.outputs.branch_name }} | ||
destination_branch: 'master' | ||
github_token: ${{ secrets.PAT }} | ||
pr_title: "chore(release): pulling ${{ steps.create-release.outputs.branch_name }} into master" | ||
pr_body: ":crown: *An automated PR*" | ||
pr_reviewer: 'itsdebs' |
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,55 @@ | ||
name: Notion PR Sync | ||
|
||
on: | ||
issues: | ||
types: | ||
[ | ||
opened, | ||
edited, | ||
deleted, | ||
transferred, | ||
pinned, | ||
unpinned, | ||
closed, | ||
reopened, | ||
assigned, | ||
unassigned, | ||
labeled, | ||
unlabeled, | ||
locked, | ||
unlocked, | ||
milestoned, | ||
demilestoned, | ||
] | ||
pull_request: | ||
types: | ||
[ | ||
assigned, | ||
unassigned, | ||
labeled, | ||
unlabeled, | ||
opened, | ||
edited, | ||
closed, | ||
reopened, | ||
synchronize, | ||
converted_to_draft, | ||
ready_for_review, | ||
locked, | ||
unlocked, | ||
review_requested, | ||
review_request_removed, | ||
auto_merge_enabled, | ||
auto_merge_disabled, | ||
] | ||
|
||
jobs: | ||
request: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Sync Github PRs to Notion | ||
uses: sivashanmukh/github-notion-pr-sync@1.0.0 | ||
with: | ||
notionKey: ${{ secrets.NOTION_BOT_KEY }} | ||
notionDatabaseId: ${{ secrets.NOTION_PR_DB_ID }} | ||
githubKey: ${{ secrets.PAT }} |
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,64 @@ | ||
name: Publish new github release | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
types: | ||
- closed | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
required: true | ||
|
||
jobs: | ||
release: | ||
name: Publish new release | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'workflow_dispatch' }} || (startsWith(github.event.pull_request.head.ref, 'release/') && github.event.pull_request.merged == true) # only merged pull requests must trigger this job | ||
steps: | ||
- name: Extract version from branch name (for release branches) | ||
id: extract-version | ||
run: | | ||
BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | ||
if [ "$BRANCH_NAME" = "" ]; then BRANCH_NAME=${{ github.event.inputs.version }} | ||
fi | ||
echo "BRANCH_NAME considered: ${BRANCH_NAME}" | ||
VERSION=${BRANCH_NAME#release/} | ||
echo "release_version=$VERSION" >> $GITHUB_OUTPUT | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
# In order to make a commit, we need to initialize a user. | ||
# You may choose to write something less generic here if you want, it doesn't matter functionality wise. | ||
- name: Initialize mandatory git config | ||
run: | | ||
git config user.name "GitHub actions" | ||
git config user.email noreply@github.com | ||
- name: Create Github Release & Tag | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.PAT }} | ||
run: | | ||
git tag -a v${{ steps.extract-version.outputs.release_version }} -m "chore: release v${{ steps.extract-version.outputs.release_version }}" | ||
git push origin refs/tags/v${{ steps.extract-version.outputs.release_version }} | ||
DEBUG=conventional-github-releaser npx conventional-github-releaser -p angular | ||
- name: Delete release branch | ||
uses: koj-co/delete-merged-action@master | ||
if: startsWith(github.event.pull_request.head.ref, 'release/') | ||
with: | ||
branches: 'release/*' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,40 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [ created ] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
environment: deployment | ||
steps: | ||
- name: Checkout source branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: cache gradle dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-core-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle-core- | ||
- name: Publish release to sonatype | ||
run: ./gradlew publishToSonatype -Prelease closeAndReleaseSonatypeStagingRepository | ||
env: | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | ||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.NEXUS_USERNAME }} | ||
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | ||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
|
||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.NEXUS_PASSWORD }} | ||
SIGNING_PRIVATE_KEY_BASE64: ${{ secrets.SIGNING_PRIVATE_KEY_BASE64 }} |
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,41 @@ | ||
name: Notify Slack Channel | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy-tag: | ||
name: Notify Slack | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Send message to Slack channel | ||
id: slack | ||
uses: slackapi/slack-github-action@v1.23.0 | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
PROJECT_NAME: rudder-integration-appsflyer-android | ||
with: | ||
channel-id: "${{ secrets.SLACK_RELEASE_CHANNEL_ID }}" | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "New release: ${{ env.PROJECT_NAME }}" | ||
} | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*Release: <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}>*" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.