Skip to content

feat: add ios splash #89

feat: add ios splash

feat: add ios splash #89

Workflow file for this run

name: Build
on:
workflow_dispatch:
inputs:
version:
required: false
description: The version to release
push:
branches:
- main
jobs:
flutter:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Download dependencies
run: flutter pub get
- name: Setup Supabase
uses: supabase/setup-cli@v1
- name: Start Supabase local for tests
run: supabase start
- name: Run tests
run: |
supabase status -o json > supabase/config/localhost.json
flutter test
- name: Calculate new tag name
id: calculate
run: |
if [[ -n "${{ inputs.version }}" ]]; then
NEW_TAG_NAME="v${{ inputs.version }}"
else
# Attempt to get the latest tag
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [ -z "$LATEST_TAG" ]; then
# No tags exist, default to v1.0.0
NEW_TAG_NAME="v1.0.0"
else
# Increment the latest tag
NEW_TAG_NAME=$(echo $LATEST_TAG | awk -F. '{OFS="."; $NF+=1; print $0}')
fi
fi
echo "tag_name=${NEW_TAG_NAME}" >> $GITHUB_OUTPUT
- name: Create release
uses: ncipollo/release-action@v1
with:
name: ${{ steps.calculate.outputs.tag_name }}
tag: ${{ steps.calculate.outputs.tag_name }}
generateReleaseNotes: true
makeLatest: true
- name: Configure git
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "[email protected]"
git fetch origin gh-pages:gh-pages
- name: Compile web and put in gh-pages branch
run: dart run peanut --extra-args "--dart-define=ENV=dev"
- name: Push gh-pages
run: git push origin gh-pages
- name: Retrieve the Android keystore and key properties
env:
UPLOAD_KEYSTORE_B64: ${{ secrets.UPLOAD_KEYSTORE_B64 }}
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }}
run: |
echo "$UPLOAD_KEYSTORE_B64" | base64 --decode > android/keystore.jks
echo "$KEY_PROPERTIES" > android/key.properties
- name: Compile Android app
run: |
TAG_NAME=${{ steps.calculate.outputs.tag_name }}
flutter build appbundle --build-number ${{ github.run_number }} --build-name ${TAG_NAME:1} --dart-define=ENV=dev
- name: Upload Android app to Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: is.giorgio.app.parousia
releaseFiles: build/app/outputs/bundle/release/app-release.aab
track: internal
status: draft
mappingFile: build/app/outputs/mapping/release/mapping.txt
debugSymbols: build/app/intermediates/merged_native_libs/release/out/lib