Skip to content

Add medium widget layout #3

Add medium widget layout

Add medium widget layout #3

Workflow file for this run

name: "Build"
on:
push:
branches:
- main
paths:
- 'pubspec.yaml'
workflow_dispatch:
jobs:
build:
name: Build & Release
runs-on: ubuntu-latest
steps:
# Checkout Repository
- name: Checkout Repository
uses: actions/checkout@v4
# Setup Java
- name: Set Up Java
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '17'
cache: gradle
# Setup Flutter
- name: Set Up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.0'
channel: 'stable'
cache: true
# Install Dependencies
- name: Install Dependencies
run: flutter pub get
# Building APK
- name: Build APK
run: |
flutter build apk --release --no-shrink --dart-define=ENTSOE_TOKEN=${{ secrets.ENTSOE_TOKEN }}
env:
ENTSOE_TOKEN: ${{ secrets.ENTSOE_TOKEN }}
# Upload Artifacts
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Releases
path: build/app/outputs/flutter-apk/app-release.apk
# Extract Version
- name: Extract version from pubspec.yaml
id: extract_version
run: |
version=$(grep '^version: ' pubspec.yaml | cut -d ' ' -f 2 | tr -d '\r')
echo "VERSION=$version" >> $GITHUB_ENV
# Check Tag Exists
- uses: mukunku/[email protected]
id: check-tag
with:
tag: "v${{ env.VERSION }}"
# Create Release
- name: Create Release
if: steps.check-tag.outputs.exists == 'false'
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/flutter-apk/app-release.apk"
tag: v${{ env.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}