Update actions/dependency-review-action action to v3.1.5 #2263
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Demo | |
on: | |
push: | |
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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # v2.12.0 | |
with: | |
cache: true | |
- name: Gradle cache | |
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1 | |
- name: Run flutter build apk --debug | |
run: | | |
set -e | |
export JAVA_HOME=$JAVA_HOME_17_X64 | |
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 | |
- name: Run flutter build apk --release | |
run: | | |
set -e | |
export JAVA_HOME=$JAVA_HOME_17_X64 | |
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 |