Skip to content

Updated dev container #29

Updated dev container

Updated dev container #29

Workflow file for this run

name: Build & Release
on:
push:
branches: [main]
workflow_dispatch:
jobs:
android-build:
name: Build signed Android binaries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: "stable"
- run: flutter clean
- name: Cache pub dependencies
uses: actions/cache@v4
with:
path: ${{ env.FLUTTER_HOME }}/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: flutter build apk --release
- name: Upload app bundle
uses: actions/upload-artifact@v4
with:
name: apk
path: build/app/outputs/flutter-apk/app-release.apk
retention-days: 1
web-build:
name: Build web app and deploy to github pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: "stable"
- run: flutter clean
- name: Cache pub dependencies
uses: actions/cache@v4
with:
path: ${{ env.FLUTTER_HOME }}/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- run: flutter pub get
- run: flutter pub upgrade
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: flutter build web --base-href=/MonkeyMon/
- uses: vimtor/[email protected]
with:
files: build/web/
dest: monkey_mon_web.zip
- name: Upload web bundle
uses: actions/upload-artifact@v4
with:
name: web
path: monkey_mon_web.zip
retention-days: 1
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/web
ios-build:
name: Build unsigned ios binaries
runs-on: macos-13
steps:
# Checks-out our repository under $GITHUB_WORKSPACE, so our job can access it
- name: Checkout repository
uses: actions/checkout@v4
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_15.0.1.app/Contents/Developer'
# Install flutter
- name: Flutter get
uses: subosito/flutter-action@v2
with:
channel: 'stable'
# Install your project's dependencies
- run: flutter clean
- name: Cache pub dependencies
uses: actions/cache@v4
with:
path: ${{ env.FLUTTER_HOME }}/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- run: flutter pub get
# Build and sign the ipa using a single flutter command
- run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Building IPA
run: flutter build ipa --release --no-codesign
# Collect the file and upload as artifact
- name: collect ipa artifacts
uses: actions/upload-artifact@v4
with:
name: ipa
# Path to the release files
path: build/ios/archive/Runner.xcarchive
release:
name: Create Github release
needs: [android-build, ios-build, web-build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: apk
path: build
- uses: actions/download-artifact@v4
with:
name: web
path: build
- uses: actions/download-artifact@v4
with:
name: ipa
path: build
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Development Build"
files: |
build/app-release.apk
build/monkey_mon_web.zip
build/Runner.xcarchive