-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Automatic release #223
base: master
Are you sure you want to change the base?
Changes from all commits
b8f9e8c
657be46
67b7ba9
dc22dec
2faa168
e72ed5d
f799f01
08025db
cb47de1
8d5636c
6f190af
e51810c
df2b8c8
95d9dc3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Automated release | ||
|
||
Make releasing easy! | ||
|
||
If you have any question, feel free to ask to me (@wakwa3125). | ||
|
||
# ATTENTION | ||
|
||
**FIRST YOU MUST UPLOAD YOUR APK FILE WITH NON-AUTOMATED FLOW** | ||
**THIS IS PUBLISHING API RESTRICT** | ||
|
||
# Setup | ||
|
||
## 1. Install supply(fastlane) | ||
|
||
``` | ||
gem install fastlane | ||
``` | ||
|
||
## 2. Create Service Account at GooglePlayConsole. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🙋 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes right. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Make sense. |
||
|
||
1. Go to your Google Play Developer Console. | ||
2. Select Settings tab. | ||
3. Select API access tab. | ||
4. Click Create ServiceAccount and follow the dialog. | ||
5. Provide name for the ServiceAccount. | ||
6. Click Select a role and choose Project > **Service Account Actor** | ||
7. **Furnish a new private key checkbox**(It's important!) | ||
8. Select JSON as the key type. | ||
9. Click create. | ||
10. Download the JSON key file as file name **key.json** | ||
11. Back to Google Play Developer Console, and click Done button. | ||
12. Provide access to the new ServiceAccount. | ||
13. Set Release Manager as role of new ServiceAccount. | ||
14. Click add user to close the dialog. | ||
|
||
## 3. Prepare for this project. | ||
|
||
1. First run `./gradlew setUpRelease` | ||
This just create required files. | ||
|
||
2. Put your key.json file to project root. | ||
This file has add to .gitignore. So it's safe. | ||
|
||
3. Open `deploy2store.sh` and replace `[YOUR_APK_FILE_NAME]` to yours. | ||
|
||
4. Second run `./gradlew donwloadMetaData` | ||
This download all metadata(such as changelogs) from GooglePlayStore and save them to repo. | ||
|
||
# Release | ||
## Write changelogs | ||
- **You can skip this. Because you can wirte changelog at your console.** | ||
**File name roule is [versioncode].txt** | ||
Save your changelogs like a following directory. | ||
This directory is made by run `./gradlew downloadMetaData` | ||
|
||
``` | ||
└── fastlane | ||
└── metadata | ||
└── android | ||
├── en-US | ||
│ └── changelogs | ||
│ ├── 100000.txt | ||
│ └── 100100.txt | ||
└── fr-FR | ||
└── changelogs | ||
└── 100100.txt | ||
... | ||
``` | ||
|
||
## Run the script | ||
- Just run `./gradlew releaseApp` | ||
APK will upload to alpha channel. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,10 @@ apply plugin: 'jacoco' | |
apply plugin: 'com.android.application' | ||
apply plugin: 'me.tatarka.retrolambda' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'com.google.firebase.firebase-crash' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question 🙋 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can upload the mapping file to FirebaseCrash. |
||
apply plugin: 'com.cookpad.android.licensetools' | ||
apply plugin: 'com.github.ben-manes.versions' | ||
apply from: '../gradle/task.gradle' | ||
|
||
// Manifest version | ||
def versionMajor = 0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Copy template shell | ||
* */ | ||
task setUpRelease(type: Exec) { | ||
workingDir '../' | ||
commandLine "./gradlew", "clean" | ||
commandLine "./script/bootstrap.sh" | ||
} | ||
|
||
/** | ||
* | ||
* Init this project with supply | ||
* */ | ||
task downloadMetaData(type: Exec) { | ||
workingDir '../' | ||
commandLine "./gradlew", "clean" | ||
commandLine "./script/initsupply.sh" | ||
} | ||
|
||
/** | ||
* | ||
* Release your AWESOME app to GooglePlay(alpha channel) | ||
* */ | ||
// TODO: Build apk with FirebaseCrash plugin | ||
task releaseApp(type: Exec) { | ||
workingDir '../' | ||
commandLine "./gradlew", "clean" | ||
commandLine "./gradlew", "app:firebaseUploadProductionReleaseProguardMapping" | ||
commandLine "./script/deploy2store.sh" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cp ./script/deploy2store.template ./script/deploy2store.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
fastlane supply run -p io.github.droidkaigi.confsched2017 \ | ||
-a alpha \ | ||
-j ./key.json \ | ||
-u /app/build/outputs/apk/[YOUR_APK_FILE_NAME] \ | ||
--verbose --skip_upload_images --skip_upload_screenshots |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
fastlane supply run -p io.github.droidkaigi.confsched2017 \ | ||
-a alpha \ | ||
-j ./key.json \ | ||
-u /app/build/outputs/apk/[YOUR_APK_FILE_NAME] \ | ||
--verbose --skip_upload_images --skip_upload_screenshots |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fastlane supply init \ | ||
-j ./key.json \ | ||
-p o.github.droidkaigi.confsched2017 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JFYI, you can use
git update-index --skip-worktree .idea/$FILENAME
to ignore git-controlled files with keeping changes. 😃There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmatsu THX! I did't know about that...👽