Skip to content

Commit 3f9ea49

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

File tree

3 files changed

+142
-52
lines changed

3 files changed

+142
-52
lines changed

.github/workflows/production.yml

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

33
on:
4-
push:
5-
# branches:
6-
# - master
7-
tags:
8-
- 'v*'
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Github release version'
8+
required: true
9+
type: string
10+
release:
11+
types: [released]
912

1013
jobs:
1114
build:
1215
runs-on: ubuntu-latest
1316
steps:
1417

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

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

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

4862
- name: Create service_account.json
4963
id: createServiceAccount
@@ -73,15 +87,15 @@ jobs:
7387
status: inProgress
7488
whatsNewDirectory: whatsnew/
7589

76-
- name: Deploy Free to Indus App Store
77-
id: uploadToIndus
78-
uses: yogeshpaliyal/upload-indus-appstore@v0.0.6
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 }}
90+
# - name: Deploy Free to Indus App Store
91+
# id: uploadToIndus
92+
# uses: yogeshpaliyal/upload-indus-appstore@v0.0.6
93+
# with:
94+
# type: UPLOAD_AAB
95+
# apiKey: ${{secrets.INDUS_API_KEY}}
96+
# packageName: com.yogeshpaliyal.keypass
97+
# aabFile: app/build/outputs/bundle/freeRelease/*.aab
98+
# signingKeyBase64: ${{ secrets.SIGNING_KEY }}
99+
# keystoreAlias: ${{ secrets.ALIAS }}
100+
# keystorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
101+
# 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: 83 additions & 7 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,7 +83,6 @@ 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
62-
6386
- name: Create Release
6487
uses: ncipollo/release-action@v1.16.0
6588
with:
@@ -69,6 +92,59 @@ jobs:
6992
discussionCategory: "Release feedbacks"
7093
makeLatest: true
7194

72-
# - name: Create Pull Request
73-
# uses: peter-evans/create-pull-request@v5.0.0
95+
- name: Upload free aab to release
96+
uses: svenstaro/upload-release-action@v2
97+
with:
98+
repo_token: ${{ secrets.GITHUB_TOKEN }}
99+
file: 'app/build/outputs/bundle/freeRelease/app-free-release.aab'
100+
asset_name: 'keypass-free-${{steps.bump-app-version.outputs.newVersion}}.aab'
101+
tag: ${{ steps.bump-app-version.outputs.newVersion }}
102+
overwrite: true
74103

104+
- name: Upload pro aab to release
105+
uses: svenstaro/upload-release-action@v2
106+
with:
107+
repo_token: ${{ secrets.GITHUB_TOKEN }}
108+
file: 'app/build/outputs/bundle/proRelease/app-pro-release.aab'
109+
asset_name: 'keypass-pro-${{steps.bump-app-version.outputs.newVersion}}.aab'
110+
tag: ${{ steps.bump-app-version.outputs.newVersion }}
111+
overwrite: true
112+
113+
- uses: snnaplab/universal-apk-generate-action@v1
114+
id: apk-free-generate
115+
with:
116+
aab-path: 'app/build/outputs/bundle/freeRelease/app-free-release.aab'
117+
keystore-base64: ${{ secrets.SIGNING_KEY_WITH_PRO }}
118+
keystore-password: ${{ secrets.KEY_STORE_PASSWORD }}
119+
key-alias: ${{ secrets.ALIAS }}
120+
key-password: ${{ secrets.KEY_PASSWORD }}
121+
122+
- name: Upload free binaries to release
123+
uses: svenstaro/upload-release-action@v2
124+
with:
125+
repo_token: ${{ secrets.GITHUB_TOKEN }}
126+
file: ${{ steps.apk-free-generate.outputs.apk-path }}
127+
asset_name: 'keypass-free-${{steps.bump-app-version.outputs.newVersion}}.apk'
128+
tag: ${{ steps.bump-app-version.outputs.newVersion }}
129+
overwrite: true
130+
131+
- name: Remove universal directory
132+
run: rm -r /home/runner/work/snnaplab-universal-apk-generate-action
133+
134+
- uses: snnaplab/universal-apk-generate-action@v1
135+
id: apk-pro-generate
136+
with:
137+
aab-path: 'app/build/outputs/bundle/proRelease/app-pro-release.aab'
138+
keystore-base64: ${{ secrets.SIGNING_KEY_WITH_PRO }}
139+
keystore-password: ${{ secrets.KEY_STORE_PASSWORD }}
140+
key-alias: pro
141+
key-password: ${{ secrets.KEY_PASSWORD }}
142+
143+
- name: Upload pro binaries to release
144+
uses: svenstaro/upload-release-action@v2
145+
with:
146+
repo_token: ${{ secrets.GITHUB_TOKEN }}
147+
file: ${{ steps.apk-pro-generate.outputs.apk-path }}
148+
tag: ${{ steps.bump-app-version.outputs.newVersion }}
149+
asset_name: 'keypass-pro-${{ steps.bump-app-version.outputs.newVersion }}.apk'
150+
overwrite: true

0 commit comments

Comments
 (0)