-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config to deploy to Google Play (#114)
* Add config to deploy to Google Play * Add workflow to create release
- Loading branch information
Showing
11 changed files
with
178 additions
and
23 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,25 @@ | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
name: Create Release | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body_path: fastlane/metadata/android/en-US/changelogs/${{ github.ref }}.txt | ||
draft: false | ||
prerelease: false |
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,38 @@ | ||
name: Deploy Production | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
production: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
ssh-key: ${{ secrets.RELEASE_SSH_KEY }} | ||
- name: Set up Ruby | ||
uses: ruby/[email protected] | ||
- name: Set up Java | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
- name: Setup build dependencies | ||
run: make deps | ||
- name: Configure Git user | ||
run: | | ||
git config user.name "jocmp" | ||
git config user.email "[email protected]" | ||
- name: Bump version | ||
run: bumpver update | ||
- name: Deploy App to Production | ||
env: | ||
ENCODED_GOOGLE_PLAY_CREDENTIALS: ${{ secrets.ENCODED_GOOGLE_PLAY_CREDENTIALS }} | ||
ENCODED_GOOGLE_SERVICES: ${{ secrets.ENCODED_GOOGLE_SERVICES }} | ||
ENCODED_RELEASE_KEYSTORE: ${{ secrets.ENCODED_RELEASE_KEYSTORE }} | ||
ENCODED_SECRETS_PROPERTIES: ${{ secrets.ENCODED_SECRETS_PROPERTIES }} | ||
run: make deploy-production | ||
- name: Sync versioning to Main | ||
run: git push --follow-tags |
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
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
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 |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# Capy Reader | ||
|
||
[![CalVer v2024.06.1000][img_version]][url_version] | ||
|
||
<img src="./site/capy.png" width="100px"> | ||
|
||
_A smallish RSS reader for Feedbin_ | ||
|
||
[img_version]: https://img.shields.io/static/v1.svg?label=CalVer&message=v2024.06.1000&color=blue | ||
[url_version]: https://github.com/jocmp/capyreader |
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
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,19 @@ | ||
[bumpver] | ||
current_version = "v2024.06.1000" | ||
version_pattern = "vYYYY.0M.BUILD" | ||
commit_message = "Bump version {old_version} to {new_version}" | ||
commit = true | ||
tag = true | ||
push = false | ||
|
||
[bumpver.file_patterns] | ||
"README.md" = [ | ||
"{version}", | ||
] | ||
"bumpver.toml" = [ | ||
'current_version = "{version}"', | ||
] | ||
"app/build.gradle.kts" = [ | ||
'versionName = "{version}"', | ||
'versionCode = BUILD' | ||
] |
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
default_platform(:android) | ||
|
||
platform :android do | ||
desc 'Validate Play Store key' | ||
lane :validate_key do | ||
validate_play_store_json_key | ||
end | ||
|
||
desc "Runs all the tests" | ||
lane :test do | ||
gradle(task: "test") | ||
end | ||
|
||
desc "Submit a new Beta Build to Crashlytics Beta" | ||
lane :beta do | ||
gradle(task: "clean assembleRelease") | ||
crashlytics | ||
|
||
# sh "your_script.sh" | ||
# You can also use other beta testing services here | ||
end | ||
|
||
desc "Deploy a new version to the Google Play" | ||
lane :deploy do | ||
gradle(task: "clean assembleRelease") | ||
lane :production do | ||
build_release | ||
upload_to_play_store | ||
end | ||
end | ||
|
||
def build_release | ||
gradle(task: 'clean assembleRelease') | ||
end |
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
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,9 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# frozen_string_literal: true | ||
|
||
require 'base64' | ||
|
||
file_body = File.open(ARGV[0]).read | ||
|
||
puts Base64.strict_encode64(file_body) |
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,20 @@ | ||
#!/usr/bin/env ruby | ||
require 'open3' | ||
require 'fileutils' | ||
|
||
def fetch_config | ||
result, _, _ = Open3.capture3("bumpver show -n --environ") | ||
|
||
result | ||
.split(' ') | ||
.map { |pair| pair.split('=', 2) } | ||
.to_h | ||
end | ||
|
||
build = fetch_config["BID"].to_i | ||
next_build = build + 1 | ||
|
||
path = "fastlane/metadata/android/en-US/changelogs/#{next_build}.txt" | ||
FileUtils.touch "./#{path}" | ||
|
||
puts "Added changelog for next build (#{next_build})\n./#{path}" |