ci: add publish workflow
This commit is contained in:
parent
400335325a
commit
6927c3f6ea
1 changed files with 67 additions and 0 deletions
67
.github/workflows/publish.yaml
vendored
Normal file
67
.github/workflows/publish.yaml
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.3.0
|
||||
bundler-cache: true
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v2
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: temurin
|
||||
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Decode keystore file
|
||||
uses: timheuer/base64-to-file@v1
|
||||
id: findroid_keystore
|
||||
with:
|
||||
fileName: 'findroid-keystore.jks'
|
||||
encodedString: ${{ secrets.FINDROID_KEYSTORE }}
|
||||
|
||||
- name: Decode Play API credentials file
|
||||
uses: timheuer/base64-to-file@v1
|
||||
id: findroid_play_api_credentials
|
||||
with:
|
||||
fileName: 'findroid-play-api-credentials.json'
|
||||
encodedString: ${{ secrets.FINDROID_PLAY_API_CREDENTIALS }}
|
||||
|
||||
- name: Build and publish
|
||||
run: bundle exec fastlane publish
|
||||
env:
|
||||
FINDROID_KEYSTORE: ${{ steps.findroid_keystore.outputs.filePath }}
|
||||
FINDROID_KEYSTORE_PASSWORD: ${{ secrets.FINDROID_KEYSTORE_PASSWORD }}
|
||||
FINDROID_KEY_ALIAS: ${{ secrets.FINDROID_KEY_ALIAS }}
|
||||
FINDROID_KEY_PASSWORD: ${{ secrets.FINDROID_KEY_PASSWORD }}
|
||||
FINDROID_PLAY_API_CREDENTIALS: ${{ steps.findroid_play_api_credentials.outputs.filePath }}
|
||||
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
draft: true
|
||||
files: |
|
||||
./app/phone/build/outputs/apk/libre/release/findroid-${{ github.ref_name }}-libre-arm64-v8a.apk
|
||||
./app/phone/build/outputs/apk/libre/release/findroid-${{ github.ref_name }}-libre-armeabi-v7a.apk
|
||||
./app/phone/build/outputs/apk/libre/release/findroid-${{ github.ref_name }}-libre-x86_64.apk
|
||||
./app/phone/build/outputs/apk/libre/release/findroid-${{ github.ref_name }}-libre-x86.apk
|
Loading…
Reference in a new issue