-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build): refactor on_tag_workflow
SUITEDEV-35510 Co-authored-by: megamegax <[email protected]> Co-authored-by: Andras Sarro <[email protected]>
- Loading branch information
1 parent
8d67dd2
commit 71cc2eb
Showing
1 changed file
with
75 additions
and
3 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 |
---|---|---|
|
@@ -62,10 +62,82 @@ jobs: | |
- name: Release with Gradle | ||
run: make release | ||
|
||
CreateSampleReleaseBundle: | ||
name: Create release bundle from sample app | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 # 0 indicates all history | ||
- run: git fetch --all || echo "==> Accept any result" | ||
- name: set up JDK 1.17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
|
||
- name: Prepare CI | ||
run: make prepare-ci | ||
|
||
- name: Prepare sample release | ||
run: make prepare-sample-release | ||
|
||
- name: Create sample app release bundle | ||
run: make create-sample-release-bundle | ||
|
||
- name: Upload bundle | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: mobile-sdk-sample | ||
path: sample/build/outputs/bundle/release/sample-release.aab | ||
|
||
ReleaseSample: | ||
name: Release sample app | ||
runs-on: ubuntu-latest | ||
needs: [Release, CreateSampleReleaseBundle] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 # 0 indicates all history | ||
- run: git fetch --all || echo "==> Accept any result" | ||
|
||
- name: Download sample app | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: mobile-sdk-sample | ||
|
||
- name: create-google services json | ||
uses: jsdaniell/[email protected] | ||
with: | ||
name: google-play-services.json | ||
json: ${{ secrets.GOOGLE_PLAY_STORE_SEVICE_ACCOUNT_JSON }} | ||
|
||
- name: Playstore upload | ||
uses: r0adkll/[email protected] | ||
with: | ||
serviceAccountJson: google-play-services.json | ||
packageName: com.emarsys.sample | ||
releaseFiles: sample-release.aab | ||
|
||
- name: setup RELEASE_VERSION | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Create Release Page | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.RELEASE_VERSION }} | ||
release_name: ${{ github.ref }} | ||
body_path: changelog.md | ||
draft: false | ||
prerelease: false | ||
|
||
SlackNotification: | ||
name: Send slack notification | ||
runs-on: ubuntu-latest | ||
needs: [Release] | ||
needs: [ReleaseSample] | ||
steps: | ||
- name: setup RELEASE_VERSION | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
|
@@ -106,7 +178,7 @@ jobs: | |
CreateJiraTicket: | ||
name: Create Jira ticket | ||
runs-on: ubuntu-latest | ||
needs: [Release] | ||
needs: [ReleaseSample] | ||
steps: | ||
- name: Login to Jira | ||
uses: atlassian/gajira-login@master | ||
|
@@ -130,7 +202,7 @@ jobs: | |
OnError: | ||
name: Handle on Error | ||
runs-on: ubuntu-latest | ||
needs: [Release] | ||
needs: [ReleaseSample] | ||
if: ${{ failure() }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|