Skip to content

Update github/codeql-action action to v3.25.11 #2536

Update github/codeql-action action to v3.25.11

Update github/codeql-action action to v3.25.11 #2536

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
url: ${{ steps.now.outputs.url }}
permissions:
# write permissions are needed for `comment-on-github` step
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup Flutter
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2.16.0
with:
cache: true
- uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # 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
# https://github.com/vercel/vercel/discussions/4468
id: now
env:
VERCEL_ORG_ID: ${{ vars.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ vars.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.ZEIT_TOKEN }}
run: |
set -e
cd ./build/web
echo '{' >vercel.json
echo ' "headers": [ { "source": "/(.*)", "headers": [' >>vercel.json
echo ' { "key": "Cross-Origin-Embedder-Policy", "value": "credentialless" },' >>vercel.json
echo ' { "key": "Cross-Origin-Opener-Policy", "value": "same-origin" }' >>vercel.json
echo ' ] } ],' >>vercel.json
echo ' "rewrites":[ { "source": "/(.*)", "destination":"/" } ]' >>vercel.json
echo '}' >>vercel.json
if [ $GITHUB_REF == 'refs/heads/master' ]; then
_url=$( vercel --prod --token "${VERCEL_TOKEN}" )
else
_url=$( vercel --token "${VERCEL_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