Skip to content

Added capabilities to pluginQA #37

Added capabilities to pluginQA

Added capabilities to pluginQA #37

Workflow file for this run

name: Plugin QA
on:
push:
branches:
- releases/[0-9].x.x/[0-9].[0-9]+.x/[0-9].[0-9]+.[0-9]+-rc[0-9]+
- testWorkflow
- CI-Actions
jobs:
Run-Unit-Tests:
uses: ./.github/workflows/runTest.yml
Build-Sample-Apps-Android:
needs: [ Run-Unit-Tests ]
uses: ./.github/workflows/build-android.yml
# Build-Sample-Apps-iOS:
# needs: [ Run-Unit-Tests ]
# uses: ./.github/workflows/build-ios.yml
Deploy-To-QA:
needs: [ Build-Sample-Apps-Android ] # , Build-Sample-Apps-iOS ]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract version from pubspec.yaml
run: |
VERSION=$(grep 'version:' pubspec.yaml | sed 's/version: //')
echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV
shell: bash
- name: Extract iOS SDK version from podspec
run: |
cd ios
IOS_SDK_VERSION=$(grep "s.ios.dependency 'AppsFlyerFramework'" appsflyer_sdk.podspec | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
echo "IOS_SDK_VERSION=$IOS_SDK_VERSION" >> $GITHUB_ENV
shell: bash
- name: Extract Android SDK version
run: |
cd android
ANDROID_SDK_VERSION=$(cat build.gradle | grep 'com.appsflyer:af-android-sdk' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
echo "ANDROID_SDK_VERSION=$ANDROID_SDK_VERSION" >> $GITHUB_ENV
shell: bash
- name: Extract CHANGELOG latest changes
run: |
PACKAGE_CHANGES=$(awk -v ver="$PACKAGE_VERSION" '
BEGIN { printing = 0; }
printing && /^## / { exit; }
$0 ~ "^## " ver { printing = 1; next; }
printing { print; }
' CHANGELOG.md)
PACKAGE_CHANGES="${PACKAGE_CHANGES//'%'/'%25'}"
PACKAGE_CHANGES="${PACKAGE_CHANGES//$'\n'/'%0A'}"
PACKAGE_CHANGES="${PACKAGE_CHANGES//$'\r'/'%0D'}"
echo "PACKAGE_CHANGES=$PACKAGE_CHANGES" >> $GITHUB_ENV
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
- name: Prepare payload for Slack notification
id: slack_payload
run: |
changelog=$(echo "${{ env.PACKAGE_CHANGES }}" | jq -aRs .)
json_payload=$(jq -n \
--arg ver "${{ env.IOS_SDK_VERSION }}" \
--arg branch "${{ github.ref }}" \
--arg link "https://github.com/AppsFlyerSDK/appsflyer-flutter-plugin" \
--arg ios_version "${{ env.IOS_SDK_VERSION }}" \
--arg android_version "${{ env.ANDROID_SDK_VERSION }}" \
--arg changelog "$changelog" \
'{
"version": $ver,
"branch" : $branch,
"github-link" : $link,
"iOS-version": $ios_version,
"android-version": $android_version,
"changelog" : $changelog
}')
echo ::set-output name=payload::$json_payload
shell: bash
- name: Send notification to Slack
uses: slackapi/[email protected]
with:
payload: ${{ steps.slack_payload.outputs.payload }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}