Skip to content

Bump mockito from 5.4.3 to 5.4.4 in /packages/google_fonts (#533) #73

Bump mockito from 5.4.3 to 5.4.4 in /packages/google_fonts (#533)

Bump mockito from 5.4.3 to 5.4.4 in /packages/google_fonts (#533) #73

# Builds and deploys example web apps for each of the packages to GitHub Pages
name: Deploy examples to GitHub Pages
on:
push:
branches:
- main
paths:
- 'packages/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Determine which packages have example apps
find-example-apps:
runs-on: ubuntu-latest
outputs:
example-apps: ${{ steps.find-example-apps.outputs.example-apps }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: man ls
- name: Find example apps
id: find-example-apps
# Outputs a JSON list of packages with example apps, e.g. ["dynamic_color", "google_fonts"]
run: |
echo "::set-output name=example-apps::$(ls -d */example | xargs dirname | jq -R -s -c 'split("\n")[:-1]')"
working-directory: packages
# Build example web apps job
build:
needs: find-example-apps
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
package: ${{ fromJson(needs.find-example-apps.outputs.example-apps) }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # v2.12.0
with:
channel: 'stable'
- name: Build Flutter web app
run: flutter build web -v --release --output /tmp/${{ matrix.package }} --base-href /${{ github.event.repository.name }}/${{ matrix.package }}/
working-directory: packages/${{ matrix.package }}/example
- name: Upload web build temporarily
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: ${{ matrix.package }}
path: /tmp/${{ matrix.package }}
retention-days: 1
# Upload pages artifact to pages job
upload-to-pages:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all web builds
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
- name: Upload pages artifact
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2.0.0
with:
path: '.'
# Deploy job
deploy-pages:
needs: upload-to-pages
runs-on: ubuntu-latest
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@f156874f8191504dae5b037505266ed5dda6c382 # v3.0.6
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@9dbe3824824f8a1377b8e298bafde1a50ede43e5 # v2.0.4