Skip to content

Build with --verbose #2446

Build with --verbose

Build with --verbose #2446

Workflow file for this run

name: Demo
on:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
defaults:
run:
working-directory: demo_app
environment:
name: vercel
permissions:
# write permissions are needed for `comment-on-github` step
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Flutter
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2.16.0
with:
cache: true
- name: Gradle cache
uses: gradle/gradle-build-action@4c39dd82cd5e1ec7c6fa0173bb41b4b6bb3b86ff # v3.3.2
- run: echo JAVA_HOME=$JAVA_HOME_17_X64 >> $GITHUB_ENV
- run: flutter build apk --debug
- name: Upload debug APK
id: appetize
run: |
set -e
curl --http1.1 -v https://${{ secrets.APPETIZE_API_TOKEN }}@api.appetize.io/v1/apps \
-F file=@build/app/outputs/apk/debug/app-debug.apk \
-F platform=android \
-F note=${{ github.sha }} \
| tee build/appetize.json
# An extra `echo` to force new line
# otherwise GitHub won't be able to pick up the `set-output` command
echo
_url=$( cat build/appetize.json | jq -r .publicURL )
echo "url=${_url}" >> $GITHUB_OUTPUT
- run: flutter build web
- name: Generate supported/tags.html
run: |
set -e
( cd ./test/goldens && php tags.php >tags.html )
cp -R ./test/goldens build/web/supported
- run: flutter build apk --release --split-per-abi
- name: Copy APKs
run: cp -R build/app/outputs/apk/release build/web/apks
- name: Deploy via Vercel
id: now
env:
PROJECT_JSON: ${{ secrets.EXAMPLE_PROJECT_JSON }}
TOKEN: ${{ secrets.ZEIT_TOKEN }}
if: env.PROJECT_JSON != null && env.TOKEN != null
run: |
set -e
cd ./build/web
{ \
echo '{'; \
echo ' "version": 2,'; \
echo ' "builds": ['; \
echo ' { "src": "./**/*", "use": "@now/static" }'; \
echo ' ]'; \
echo '}'; \
} > ./now.json
mkdir -p ./.now && echo "$PROJECT_JSON" > ./.now/project.json
if [ $GITHUB_REF == 'refs/heads/master' ]; then
_url=$( now --prod --token "$TOKEN" )
else
_url=$( now --token "$TOKEN" )
fi
echo "url=${_url}" >> $GITHUB_OUTPUT
- name: Create comment
if: steps.now.conclusion == 'success'
uses: daohoangson/comment-on-github@35b21121fdbadf807678bec8210cdd7f22a934fe # v2.2.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: |
${{ github.sha }} APKs:
- [app-armeabi-v7a-release.apk](${{ steps.now.outputs.url }}/apks/app-armeabi-v7a-release.apk)
- [app-arm64-v8a-release.apk](${{ steps.now.outputs.url }}/apks/app-arm64-v8a-release.apk)
- [app-x86_64-release.apk](${{ steps.now.outputs.url }}/apks/app-x86_64-release.apk)
- [Debug APK](${{ steps.appetize.outputs.url }}) via https://appetize.io
Web build has been deployed to ${{ steps.now.outputs.url }}. Quick links:
- [supported/tags.html](${{ steps.now.outputs.url }}/supported/tags.html)
- [Hello World](${{ steps.now.outputs.url }}/#/helloworld)
- [Hello World (core)](${{ steps.now.outputs.url }}/#/helloworldcore)
- [Wordpress](${{ steps.now.outputs.url }}/#/wordpress)
fingerprint: "## Demo app"
replace: please