Skip to content

Bump version to v3.7.8 #8

Bump version to v3.7.8

Bump version to v3.7.8 #8

Workflow file for this run

on:
push:
tags:
- "v*.*.*"
name: Release
jobs:
release:
name: Release
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- os: android
runner: ubuntu-latest
- os: ios
runner: macos-latest
fail-fast: false
environment: prod
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.0.5"
channel: "stable"
cache: true
cache-key: deps-${{ hashFiles('**/pubspec.lock') }} # optional, change this to force refresh cache
cache-path: ${{ runner.tool_cache }}/flutter # optional, change this to specify the cache path
- name: Setup Android environment
if: matrix.os == 'android'
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
PLAY_STORE_UPLOAD_KEY_BASE64: ${{ secrets.PLAY_STORE_UPLOAD_KEY_BASE64 }}
PLAY_STORE_KEY_INFO_BASE64: ${{ secrets.PLAY_STORE_KEY_INFO_BASE64 }}
run: |
echo "$GOOGLE_SERVICES_JSON" > app/google-services.json
echo "$PLAY_STORE_UPLOAD_KEY_BASE64" | base64 --decode > app/keystore.jks
echo "$PLAY_STORE_KEY_INFO_BASE64" | base64 --decode > key.properties
working-directory: ${{ matrix.os }}
- name: Setup Java
if: matrix.os == 'android'
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "11"
- name: Setup iOS environment
if: matrix.os == 'ios'
env:
GOOGLE_SERVICES_PLIST: ${{ secrets.GOOGLE_SERVICES_PLIST }}
run: |
echo -n "$GOOGLE_SERVICES_PLIST" > Runner/GoogleService-Info.plist
flutter pub get && pod install
working-directory: ${{ matrix.os }}
- name: Setup Fastlane
uses: ruby/setup-ruby@v1
with:
ruby-version: "ruby"
bundler-cache: true
working-directory: ${{ matrix.os }}
- name: Run prebuild
run: bash prebuild.sh
- name: Build and deploy
env:
CAPTCHA_TOKEN: ${{ secrets.CAPTCHA_TOKEN }}
SAAS_AVAILABLE: "true"
APPLE_CERTIFICATES_SSH_KEY: ${{ secrets.APPLE_CERTIFICATES_SSH_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
PLAY_STORE_CONFIG_JSON: ${{ secrets.PLAY_STORE_CONFIG_JSON }}
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }}
run: bundle exec fastlane release
working-directory: ${{ matrix.os }}
- name: Preparing APK for release
if: matrix.os == 'android'
env:
VERSION: ${{ github.ref_name }}
run: cp build/app/outputs/flutter-apk/app-release.apk Linshare-${VERSION}.apk
- name: Create Github release
if: matrix.os == 'android'
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
generate_release_notes: true
files: |
Linshare-${{ github.ref_name }}.apk