Skip to content

Manual build release #46

Manual build release

Manual build release #46

Workflow file for this run

name: Manual build release
on:
workflow_dispatch:
inputs:
awl_ref:
description: 'The branch, tag or SHA of awl repository'
required: true
default: 'master'
awl_flutter_ref:
description: 'The branch, tag or SHA of awl-flutter repository'
required: true
default: 'master'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout awl code
uses: actions/checkout@v3
with:
fetch-depth: 0 # also fetch tags for 'git describe'
ref: ${{ github.event.inputs.awl_ref }}
path: 'awl'
- name: Checkout awl-flutter code
uses: actions/checkout@v3
with:
repository: 'anywherelan/awl-flutter'
ref: ${{ github.event.inputs.awl_flutter_ref }}
path: 'awl-flutter'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
cache: true
cache-dependency-path: awl/go.sum
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '12.x'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.x'
channel: 'stable'
- run: flutter --version
- name: Install ndk-bundle
run: $ANDROID_HOME/tools/bin/sdkmanager --install "ndk-bundle"
- name: Build
run: |
export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk-bundle
unset ANDROID_NDK_HOME
cd awl
go install golang.org/x/mobile/cmd/gomobile@latest
go get -d golang.org/x/mobile/cmd/gomobile
gomobile init
go mod tidy -compat=1.21
cd cmd/awl-tray && go mod tidy -compat=1.21 && cd ../..
./build.sh release
echo "ls build"
ls -lah build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: awl-release-build
path: awl/build/*
if-no-files-found: error
- name: Upload flutter web artifacts
uses: actions/upload-artifact@v3
with:
name: awl-release-static
path: awl/static/
if-no-files-found: error
- name: Assert number of built files
run: |
files_count="$(ls -1q awl/build/ | wc -l)"
echo "built $files_count files"
if [ "$files_count" != "17" ]; then
echo "::error::Files count mismatch"
exit 1
fi
build-macos:
runs-on: macos-latest
needs: [ build ]
defaults:
run:
shell: bash
steps:
- name: Checkout awl code
uses: actions/checkout@v3
with:
fetch-depth: 0 # also fetch tags for 'git describe'
ref: ${{ github.event.inputs.awl_ref }}
path: 'awl'
- name: Retrieve saved static/ build
uses: actions/download-artifact@v3
with:
name: awl-release-static
path: awl/static
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
cache: true
cache-dependency-path: awl/go.sum
- name: Build
run: |
cd awl
mkdir build
./build.sh release-macos
echo "ls build"
ls -lah build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: awl-release-build-macos
path: awl/build/*
if-no-files-found: error