Releases/6.x.x/6.15.x/6.15.1 rc1 #29
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
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: [ios, 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" | |
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 segment-appsflyer-ios.podspec --verbose --use-libraries --allow-warnings | |
- name: Notify with SLack | |
uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"appsflyer_version": "${{env.PLUGIN_VERSION}}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.CI_SLACK_WEBHOOK_URL }} |