Skip to content

Commit

Permalink
Updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gokadzev committed Nov 21, 2023
1 parent fb9783b commit aa26851
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ on:
push:
branches:
- master
name: Test, Build and Release apk

name: Test, Build and Release APK

env:
PROPERTIES_PATH: './android/key.properties'

jobs:
build:
name: Build APK
Expand All @@ -29,36 +32,54 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
# Setup the flutter environment.
- uses: subosito/flutter-action@v2
with:
channel: 'stable'

# Install semantic-release
- name: Install Semantic Release
run: npm install -g semantic-release

#
- run: |
echo keyPassword=\${{ secrets.KEY_STORE }} > ${{env.PROPERTIES_PATH}}
echo storePassword=\${{ secrets.KEY_PASSWORD }} >> ${{env.PROPERTIES_PATH}}
echo keyAlias=\${{ secrets.KEY_ALIAS }} >> ${{env.PROPERTIES_PATH}}
#
- run: echo "${{ secrets.KEYSTORE2 }}" | base64 --decode > android/app/key.jks

# Get flutter dependencies.
- run: flutter pub get

# Check for any formatting issues in the code.
- run: dart format --set-exit-if-changed .

# Statically analyze the Dart code for any errors.
- run: flutter analyze .

# Build arch apks.
- run: flutter build apk --release --split-per-abi --target-platform="android-arm64" --flavor github

# Upload arm64 generated apk to the artifacts.
- uses: actions/upload-artifact@v3
with:
name: Musify_arm64-v8a.apk
path: build/app/outputs/flutter-apk/app-arm64-v8a-github-release.apk

# Build universal apk.
- run: flutter build apk --release --flavor github

# Upload universal generated apk to the artifacts.
- uses: actions/upload-artifact@v3
with:
name: Musify.apk
path: build/app/outputs/flutter-apk/app-github-release.apk

# Run semantic-release
- name: Run Semantic Release
run: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit aa26851

Please sign in to comment.