Skip to content
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

Fastlane builds #64

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and Upload release

on:
push:
tags:
- 'v*'

jobs:
CI:
name: Build and Upload release
runs-on: ubuntu-latest

env:
GOOGLE_SERVICE_KEY_JSON: ${{ secrets.GOOGLE_SERVICE_KEY_JSON }}
KEYSTORE_JKS: ${{ secrets.KEYSTORE_JKS }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
TOKEN_GITHUB: ${{ secrets.TOKEN_GITHUB }}
VERSION_TAG: ${{ github.ref_name }}

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup JDK
uses: actions/setup-java@v1
with:
java-version: 17

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.3'
bundler-cache: true

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Generate google-service-key.json file
run: echo ${{secrets.GOOGLE_SERVICE_KEY_JSON}} | base64 -d > /home/runner/work/YouAMP/YouAMP/google-service-key.json

- name: Generate .jks file
run: echo ${{secrets.KEYSTORE_JKS}} | base64 -d > /home/runner/work/YouAMP/YouAMP/keystore.jks

- name: Publish github release with fastlane
run: bundle exec fastlane github
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem "fastlane"
2 changes: 2 additions & 0 deletions fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
json_key_file("google-service-key.json")
package_name("ru.stersh.youamp")
24 changes: 24 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
default_platform(:android)

platform :android do
desc "Lane for distributing app using Github releases"
lane :github do
gradle(
task: "assemble",
build_type: "Release",
properties: {
"android.injected.signing.store.file" => "/home/runner/work/YouAMP/YouAMP/keystore.jks",
"android.injected.signing.store.password" => ENV['KEYSTORE_PASSWORD'],
"android.injected.signing.key.alias" => ENV['KEYSTORE_KEY_ALIAS'],
"android.injected.signing.key.password" => ENV['KEYSTORE_KEY_PASSWORD'],
}
)
set_github_release(
repository_name: "siper/YouAMP",
api_token: ENV['TOKEN_GITHUB'],
name: ENV['VERSION_TAG'],
tag_name: ENV['VERSION_TAG'],
upload_assets: ["app/build/outputs/apk/release/app-release.apk"]
)
end
end
Empty file modified gradlew
100644 → 100755
Empty file.