Skip to content

Commit 7b09c2e

Browse files
committed
Merge pull request #1155 from yogeshpaliyal/fixProcess
Fix Release Process
2 parents fefd089 + 75cb067 commit 7b09c2e

File tree

3 files changed

+131
-50
lines changed

3 files changed

+131
-50
lines changed

.github/workflows/production.yml

Lines changed: 56 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,64 @@
11
name: Deploy App Play Store
22

33
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Github release version'
8+
required: true
9+
type: string
410
push:
5-
# branches:
6-
# - master
7-
tags:
8-
- 'v*'
11+
tags:
12+
- 'v*'
913

1014
jobs:
1115
build:
1216
runs-on: ubuntu-latest
1317
steps:
1418

1519
- uses: actions/checkout@v4
16-
17-
- name: Setting up project
18-
uses: ./.github/actions/setup
1920

20-
- name: Build Free Release AAB
21-
id: buildFreeRelease
22-
run: ./gradlew bundleFreeRelease
21+
# Add this step before the 'Post Merged PR to BlueSky' step
22+
- name: Echo Release name
23+
run: |
24+
echo "${{ github.ref_name || github.event.inputs.version }}"
2325
24-
- name: Build Pro Release AAB
25-
id: buildProRelease
26-
run: ./gradlew bundleProRelease
2726
28-
- name: Sign Free AAB
29-
id: signPro
30-
uses: r0adkll/sign-android-release@fix/bundle-signing
27+
- uses: robinraju/release-downloader@v1
3128
with:
32-
releaseDirectory: app/build/outputs/bundle/freeRelease
33-
signingKeyBase64: ${{ secrets.SIGNING_KEY_WITH_PRO }}
34-
alias: ${{ secrets.ALIAS }}
35-
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
36-
keyPassword: ${{ secrets.KEY_PASSWORD }}
29+
# The github tag. e.g: v1.0.1
30+
# Download assets from a specific tag/version
31+
tag: ${{ github.ref_name || github.event.inputs.version }}
32+
# The name of the file to download.
33+
# Use this field only to specify filenames other than tarball or zipball, if any.
34+
# Supports wildcard pattern (eg: '*', '*.deb', '*.zip' etc..)
35+
fileName: 'keypass-free-*.aab'
36+
# Relative path under $GITHUB_WORKSPACE to place the downloaded file(s)
37+
# It will create the target directory automatically if not present
38+
# eg: out-file-path: "my-downloads" => It will create directory $GITHUB_WORKSPACE/my-downloads
39+
out-file-path: 'app/build/outputs/bundle/freeRelease'
40+
# Github access token to download files from private repositories
41+
# https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
42+
# eg: token: ${{ secrets.MY_TOKEN }}
43+
token: ${{ secrets.GITHUB_TOKEN }}
3744

38-
- name: Sign Pro AAB
39-
id: sign
40-
uses: r0adkll/sign-android-release@fix/bundle-signing
45+
- uses: robinraju/release-downloader@v1
4146
with:
42-
releaseDirectory: app/build/outputs/bundle/proRelease
43-
signingKeyBase64: ${{ secrets.SIGNING_KEY_WITH_PRO }}
44-
alias: pro
45-
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
46-
keyPassword: ${{ secrets.KEY_PASSWORD }}
47+
# The github tag. e.g: v1.0.1
48+
# Download assets from a specific tag/version
49+
tag: ${{ github.ref_name || github.event.inputs.version }}
50+
# The name of the file to download.
51+
# Use this field only to specify filenames other than tarball or zipball, if any.
52+
# Supports wildcard pattern (eg: '*', '*.deb', '*.zip' etc..)
53+
fileName: 'keypass-pro-*.aab'
54+
# Relative path under $GITHUB_WORKSPACE to place the downloaded file(s)
55+
# It will create the target directory automatically if not present
56+
# eg: out-file-path: "my-downloads" => It will create directory $GITHUB_WORKSPACE/my-downloads
57+
out-file-path: 'app/build/outputs/bundle/proRelease'
58+
# Github access token to download files from private repositories
59+
# https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
60+
# eg: token: ${{ secrets.MY_TOKEN }}
61+
token: ${{ secrets.GITHUB_TOKEN }}
4762

4863
- name: Create service_account.json
4964
id: createServiceAccount
@@ -73,15 +88,15 @@ jobs:
7388
status: inProgress
7489
whatsNewDirectory: whatsnew/
7590

76-
- name: Deploy Free to Indus App Store
77-
id: uploadToIndus
78-
uses: yogeshpaliyal/[email protected]
79-
with:
80-
type: UPLOAD_AAB
81-
apiKey: ${{secrets.INDUS_API_KEY}}
82-
packageName: com.yogeshpaliyal.keypass
83-
aabFile: app/build/outputs/bundle/freeRelease/*.aab
84-
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
85-
keystoreAlias: ${{ secrets.ALIAS }}
86-
keystorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
87-
keyPassword: ${{ secrets.KEY_PASSWORD }}
91+
# - name: Deploy Free to Indus App Store
92+
# id: uploadToIndus
93+
# uses: yogeshpaliyal/[email protected]
94+
# with:
95+
# type: UPLOAD_AAB
96+
# apiKey: ${{secrets.INDUS_API_KEY}}
97+
# packageName: com.yogeshpaliyal.keypass
98+
# aabFile: app/build/outputs/bundle/freeRelease/*.aab
99+
# signingKeyBase64: ${{ secrets.SIGNING_KEY }}
100+
# keystoreAlias: ${{ secrets.ALIAS }}
101+
# keystorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
102+
# keyPassword: ${{ secrets.KEY_PASSWORD }}

.github/workflows/uploadBuildOnTag.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Upload build on release tag
22

33
on:
4-
push:
5-
tags:
6-
- '*'
4+
# push:
5+
# tags:
6+
# - '*'
77
workflow_dispatch:
88
inputs:
99
tag:

.github/workflows/version-bump.yaml

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424

25-
# - name: Checkout
26-
# run: |
27-
# git checkout -b autoVersionBump
28-
2925
- name: 🏗 Bump App Version
3026
id: bump-app-version
3127
run: |
@@ -47,6 +43,34 @@ jobs:
4743
- name: Print newVersion
4844
run: echo "${{ steps.bump-app-version.outputs.newVersion }}"
4945

46+
- name: Build Free Release AAB
47+
id: buildFreeRelease
48+
run: ./gradlew bundleFreeRelease
49+
50+
- name: Build Pro Release AAB
51+
id: buildProRelease
52+
run: ./gradlew bundleProRelease
53+
54+
- name: Sign Free AAB
55+
id: signPro
56+
uses: r0adkll/sign-android-release@fix/bundle-signing
57+
with:
58+
releaseDirectory: app/build/outputs/bundle/freeRelease
59+
signingKeyBase64: ${{ secrets.SIGNING_KEY_WITH_PRO }}
60+
alias: ${{ secrets.ALIAS }}
61+
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
62+
keyPassword: ${{ secrets.KEY_PASSWORD }}
63+
64+
- name: Sign Pro AAB
65+
id: sign
66+
uses: r0adkll/sign-android-release@fix/bundle-signing
67+
with:
68+
releaseDirectory: app/build/outputs/bundle/proRelease
69+
signingKeyBase64: ${{ secrets.SIGNING_KEY_WITH_PRO }}
70+
alias: pro
71+
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
72+
keyPassword: ${{ secrets.KEY_PASSWORD }}
73+
5074
- name: Push to protected branch
5175
uses: CasperWA/push-protected@v2
5276
with:
@@ -59,16 +83,58 @@ jobs:
5983
git tag -a ${{ steps.bump-app-version.outputs.newVersion }} -m "Release version ${{ steps.bump-app-version.outputs.newVersion }}"
6084
git push origin ${{ steps.bump-app-version.outputs.newVersion }}
6185
86+
- name: Rename aab names
87+
run: |
88+
mkdir -p app/build/outputs/bundle/release
89+
mv app/build/outputs/bundle/freeRelease/app-free-release.aab app/build/outputs/bundle/release/keypass-free-${{steps.bump-app-version.outputs.newVersion}}.aab
90+
mv app/build/outputs/bundle/proRelease/app-pro-release.aab app/build/outputs/bundle/release/keypass-pro-${{steps.bump-app-version.outputs.newVersion}}.aab
91+
6292
6393
- name: Create Release
6494
uses: ncipollo/[email protected]
6595
with:
6696
tag: "${{ steps.bump-app-version.outputs.newVersion }}"
6797
generateReleaseNotes: true
6898
commit: "master"
99+
artifacts: "app/build/outputs/bundle/release/*.aab"
69100
discussionCategory: "Release feedbacks"
70101
makeLatest: true
71102

72-
# - name: Create Pull Request
73-
# uses: peter-evans/[email protected]
103+
- uses: snnaplab/universal-apk-generate-action@v1
104+
id: apk-free-generate
105+
with:
106+
aab-path: 'app/build/outputs/bundle/release/keypass-free-${{steps.bump-app-version.outputs.newVersion}}.aab'
107+
keystore-base64: ${{ secrets.SIGNING_KEY_WITH_PRO }}
108+
keystore-password: ${{ secrets.KEY_STORE_PASSWORD }}
109+
key-alias: ${{ secrets.ALIAS }}
110+
key-password: ${{ secrets.KEY_PASSWORD }}
111+
112+
- name: Upload free binaries to release
113+
uses: svenstaro/upload-release-action@v2
114+
with:
115+
repo_token: ${{ secrets.GITHUB_TOKEN }}
116+
file: ${{ steps.apk-free-generate.outputs.apk-path }}
117+
asset_name: 'keypass-free-${{steps.bump-app-version.outputs.newVersion}}.apk'
118+
tag: ${{ steps.bump-app-version.outputs.newVersion }}
119+
overwrite: true
120+
121+
- name: Remove universal directory
122+
run: rm -r /home/runner/work/snnaplab-universal-apk-generate-action
123+
124+
- uses: snnaplab/universal-apk-generate-action@v1
125+
id: apk-pro-generate
126+
with:
127+
aab-path: 'app/build/outputs/bundle/release/keypass-pro-${{steps.bump-app-version.outputs.newVersion}}.aab'
128+
keystore-base64: ${{ secrets.SIGNING_KEY_WITH_PRO }}
129+
keystore-password: ${{ secrets.KEY_STORE_PASSWORD }}
130+
key-alias: pro
131+
key-password: ${{ secrets.KEY_PASSWORD }}
74132

133+
- name: Upload pro binaries to release
134+
uses: svenstaro/upload-release-action@v2
135+
with:
136+
repo_token: ${{ secrets.GITHUB_TOKEN }}
137+
file: ${{ steps.apk-pro-generate.outputs.apk-path }}
138+
tag: ${{ steps.bump-app-version.outputs.newVersion }}
139+
asset_name: 'keypass-pro-${{ steps.bump-app-version.outputs.newVersion }}.apk'
140+
overwrite: true

0 commit comments

Comments
 (0)