-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1708abc
commit 5334b44
Showing
4 changed files
with
89 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,51 @@ | ||
name: PlayStore release | ||
|
||
on: | ||
push: | ||
branches: | ||
- playstore-cd | ||
|
||
jobs: | ||
playstore: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup ruby | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.x" | ||
|
||
- name: Setup fastlane | ||
run: | | ||
cd android | ||
bundle install | ||
cd .. | ||
- name: Restore json key # make sure that you restore the key in the correct directory (ref. fastlane/Appfile) | ||
run: | | ||
cd android/fastlane | ||
echo "${{ secrets.GOOGLE_API_PUB_JSON }}" | base64 --decode > service-account.json | ||
cd ../.. | ||
- name: Restore keystore # make sure that you restore the key in the correct directory (same as app/gradle.properties) | ||
run: | | ||
cd android/app | ||
echo "${{ secrets.SIGN_KEY }}" > myKeystore.keystore.asc | ||
gpg -d --passphrase ${{ secrets.SIGN_PASSWORD }} --batch myKeystore.keystore.asc > myKeystore.keystore | ||
cd ../.. | ||
- name: Set up environment | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'zulu' | ||
|
||
- name: Gradle cache | ||
uses: gradle/actions/setup-gradle@v3 | ||
|
||
- name: Upload app to Play Store (Internal track) | ||
run: | | ||
cd android | ||
bundle exec fastlane internal |
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,3 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "fastlane" |
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,2 @@ | ||
json_key_file("fastlane/service-account.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one | ||
package_name("com.enioka.scanner.demo") # e.g. com.krausefx.app |
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,33 @@ | ||
# This file contains the fastlane.tools configuration | ||
# You can find the documentation at https://docs.fastlane.tools | ||
# | ||
# For a list of all available actions, check out | ||
# | ||
# https://docs.fastlane.tools/actions | ||
# | ||
# For a list of all available plugins, check out | ||
# | ||
# https://docs.fastlane.tools/plugins/available-plugins | ||
# | ||
|
||
# Uncomment the line if you want fastlane to automatically update itself | ||
# update_fastlane | ||
|
||
default_platform(:android) | ||
|
||
platform :android do | ||
|
||
# LANE 1 | ||
desc "Publish a new version to the Google Play (INTERNAL)" | ||
lane :internal do | ||
|
||
# Generate AAB file | ||
gradle( | ||
task: "bundle", | ||
build_type: "Release" | ||
) | ||
|
||
# Upload the AAB to play store (internal track) | ||
upload_to_play_store(track: 'internal', validate_only: true) | ||
end | ||
end |