Skip to content

Releases/6.x.x/6.15.x/6.15.0 rc1 #1

Releases/6.x.x/6.15.x/6.15.0 rc1

Releases/6.x.x/6.15.x/6.15.0 rc1 #1

name: Release plugin to production
on:
pull_request:
types:
- closed
branches:
- 'main'
# - 'dev/add-release-workflow'
jobs:
Deploy-To-Production:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/')
runs-on: [ios, self-hosted]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: PR branch check
uses: mdecoleman/pr-branch-name@1.2.0
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"
echo "from branch: ${{github.head_ref}}"
- 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: Install Cocoapods
run: gem install cocoapods
- name: Push to COCOAPODS
run: |
pod trunk me
pod trunk push AppsFlyerAdobeAEPExtension.podspec
- name: Notify with SLack
uses: slackapi/slack-github-action@v1.23.0
with:
payload: |
{
"appsflyer_version": "${{env.PLUGIN_VERSION}}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.CI_SLACK_WEBHOOK_URL }}