77 - main
88 paths :
99 - ' packages/**'
10-
1110 # Allows you to run this workflow manually from the Actions tab
1211 workflow_dispatch :
1312
2322 outputs :
2423 example-apps : ${{ steps.find-example-apps.outputs.example-apps }}
2524 steps :
26- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+ - uses : actions/checkout@v4
2726 - name : Find example apps
2827 id : find-example-apps
2928 # Outputs a JSON list of packages with example apps, e.g. ["dynamic_color", ...]
@@ -42,23 +41,20 @@ jobs:
4241 matrix :
4342 package : ${{ fromJson(needs.find-example-apps.outputs.example-apps) }}
4443 steps :
45- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
46- - uses : subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
44+ - uses : actions/checkout@v4
45+ - uses : subosito/flutter-action@v2
4746 with :
4847 channel : ' stable'
4948
5049 - name : Build Flutter web app
51- run : flutter build web -v --release --output /tmp/${MATRIX_PACKAGE} -- base-href /${GITHUB_EVENT_REPOSITORY_NAME} /${MATRIX_PACKAGE }/
50+ run : flutter build web -v --release --base-href /${{ github.event.repository.name }} /${{ matrix.package } }/
5251 working-directory : packages/${{ matrix.package }}/example
53- env :
54- MATRIX_PACKAGE : ${{ matrix.package }}
55- GITHUB_EVENT_REPOSITORY_NAME : ${{ github.event.repository.name }}
5652
5753 - name : Upload web build temporarily
58- uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
54+ uses : actions/upload-artifact@v4
5955 with :
6056 name : ${{ matrix.package }}
61- path : /tmp/ ${{ matrix.package }}
57+ path : packages/ ${{ matrix.package }}/example/build/web
6258 retention-days : 1
6359
6460 # Upload pages artifact to pages job
@@ -67,27 +63,15 @@ jobs:
6763 runs-on : ubuntu-latest
6864 steps :
6965 - name : Download all web builds
70- uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
66+ uses : actions/download-artifact@v4
7167 with :
72- path : artifacts
73- merge-multiple : false
68+ path : site
7469
75- - name : Assemble Pages directory structure
76- run : |
77- mkdir -p site
78- for artifact_path in artifacts/*; do
79- if [ -d "$artifact_path" ]; then
80- package_name="$(basename "$artifact_path")"
81- mkdir -p "site/$package_name"
82- cp -R "$artifact_path"/. "site/$package_name"/
83- elif [ -f "$artifact_path" ]; then
84- # If it is a standalone file like favicon.png, copy it to the site root
85- cp "$artifact_path" site/
86- fi
87- done
70+ - name : Disable Jekyll
71+ run : touch site/.nojekyll
8872
8973 - name : Upload pages artifact
90- uses : actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
74+ uses : actions/upload-pages-artifact@v3
9175 with :
9276 path : ' site'
9377
10387 url : ${{ steps.deployment.outputs.page_url }}
10488 steps :
10589 - name : Setup Pages
106- uses : actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
107-
90+ uses : actions/configure-pages@v5
10891 - name : Deploy to GitHub Pages
10992 id : deployment
110- uses : actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
93+ uses : actions/deploy-pages@v4
0 commit comments