Skip to content

v0.2.0-alpha.5

v0.2.0-alpha.5 #18

Workflow file for this run

name: build release file
on:
release:
types: [ released ]
env:
APP_NAME: Waiter
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Build
run: |
flutter config --enable-windows-desktop
flutter build windows --build-name=$GITHUB_REF_NAME --build-number=$GITHUB_RUN_NUMBER
Compress-Archive -Path .\build\windows\x64\runner\Release\* -DestinationPath ${{ env.APP_NAME }}-windows-${{ github.ref_name }}.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.APP_NAME }}-windows-${{ github.ref_name }}.zip
- uses: actions/upload-artifact@v3
with:
name: windows
path: ${{ env.APP_NAME }}-windows-${{ github.ref_name }}.zip
build-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Build
run: |
flutter pub get
flutter build web --build-name=$GITHUB_REF_NAME --build-number=$GITHUB_RUN_NUMBER
tar -zcvf ${{ env.APP_NAME }}-web-${{ github.ref_name }}.tar.gz ./build/web/*
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.APP_NAME }}-web-${{ github.ref_name }}.tar.gz
- uses: actions/upload-artifact@v3
with:
name: web
path: ${{ env.APP_NAME }}-web-${{ github.ref_name }}.tar.gz
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Build
run: |
flutter pub get
flutter build apk --build-name=$GITHUB_REF_NAME --build-number=$GITHUB_RUN_NUMBER
mv ./build/app/outputs/flutter-apk/app-release.apk ${{ env.APP_NAME }}-${{ github.ref_name }}.apk
mv ./build/app/outputs/flutter-apk/app-release.apk.sha1 ${{ env.APP_NAME }}-${{ github.ref_name }}.apk.sha1
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.APP_NAME }}-${{ github.ref_name }}.apk
${{ env.APP_NAME }}-${{ github.ref_name }}.apk.sha1
- uses: actions/upload-artifact@v3
with:
name: android
path: ${{ env.APP_NAME }}-${{ github.ref_name }}.apk