-
Notifications
You must be signed in to change notification settings - Fork 3
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 #72 from urbanairship/automation
Add initial pre-release workflow
- Loading branch information
Showing
1 changed file
with
91 additions
and
0 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,91 @@ | ||
name: Prepare Plugin Releases | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
proxy_version: | ||
description: 'Framework Proxy Version (x.y.z)' | ||
required: true | ||
pattern: '^\d+\.\d+\.\d+$' | ||
ios_version: | ||
description: 'iOS SDK Version (x.y.z)' | ||
required: false | ||
pattern: '^\d+\.\d+\.\d+$' | ||
android_version: | ||
description: 'Android SDK Version (x.y.z)' | ||
required: false | ||
pattern: '^\d+\.\d+\.\d+$' | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.PREPARE_RELEASES_PAT }} | ||
|
||
jobs: | ||
trigger-releases: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
|
||
steps: | ||
- name: Trigger React Native Release | ||
run: | | ||
gh workflow run prep-release.yml \ | ||
-R urbanairship/react-native-airship \ | ||
-f react_native_version="${{ github.event.inputs.proxy_version }}" \ | ||
-f proxy_version="${{ github.event.inputs.proxy_version }}" \ | ||
$([ -n "${{ github.event.inputs.ios_version }}" ] && echo "-f ios_version=${{ github.event.inputs.ios_version }}") \ | ||
$([ -n "${{ github.event.inputs.android_version }}" ] && echo "-f android_version=${{ github.event.inputs.android_version }}") | ||
- name: Trigger Flutter Release | ||
run: | | ||
gh workflow run prep-release.yml \ | ||
-R urbanairship/airship-flutter \ | ||
-f flutter_version="${{ github.event.inputs.proxy_version }}" \ | ||
-f proxy_version="${{ github.event.inputs.proxy_version }}" \ | ||
$([ -n "${{ github.event.inputs.ios_version }}" ] && echo "-f ios_version=${{ github.event.inputs.ios_version }}") \ | ||
$([ -n "${{ github.event.inputs.android_version }}" ] && echo "-f android_version=${{ github.event.inputs.android_version }}") | ||
- name: Trigger Capacitor Release | ||
run: | | ||
gh workflow run prep-release.yml \ | ||
-R urbanairship/capacitor-airship \ | ||
-f capacitor_version="${{ github.event.inputs.proxy_version }}" \ | ||
-f proxy_version="${{ github.event.inputs.proxy_version }}" \ | ||
$([ -n "${{ github.event.inputs.ios_version }}" ] && echo "-f ios_version=${{ github.event.inputs.ios_version }}") \ | ||
$([ -n "${{ github.event.inputs.android_version }}" ] && echo "-f android_version=${{ github.event.inputs.android_version }}") | ||
- name: Trigger Cordova Release | ||
run: | | ||
gh workflow run prep-release.yml \ | ||
-R urbanairship/urbanairship-cordova \ | ||
-f cordova_version="${{ github.event.inputs.proxy_version }}" \ | ||
-f proxy_version="${{ github.event.inputs.proxy_version }}" \ | ||
$([ -n "${{ github.event.inputs.ios_version }}" ] && echo "-f ios_version=${{ github.event.inputs.ios_version }}") \ | ||
$([ -n "${{ github.event.inputs.android_version }}" ] && echo "-f android_version=${{ github.event.inputs.android_version }}") | ||
- name: Handle Success | ||
if: success() | ||
run: | | ||
echo "Successfully triggered release preparations for all plugins" | ||
- name: Handle Failure | ||
if: failure() | ||
run: | | ||
echo "::error::Failed to trigger one or more plugin releases. Please check the logs above for details." | ||
exit 1 | ||
- name: Slack Notification (Success) | ||
if: success() | ||
uses: homoluctus/slatify@master | ||
with: | ||
type: success | ||
job_name: ":tada: Plugin release preparations triggered :tada:" | ||
message: "@mobile-team Release preparations have been triggered for all plugins with proxy version v${{ github.event.inputs.proxy_version }} :rocket:" | ||
url: ${{ secrets.MOBILE_SLACK_WEBHOOK }} | ||
|
||
- name: Slack Notification (Failure) | ||
if: failure() | ||
uses: homoluctus/slatify@master | ||
with: | ||
type: failure | ||
job_name: ":disappointed: Plugin Release Preparations Failed :disappointed:" | ||
message: "@crow Failed to trigger plugin release preparations. Please check the workflow logs. :sob:" | ||
url: ${{ secrets.MOBILE_SLACK_WEBHOOK }} |