shitman/.forgejo/workflows/main-build.yaml
zeyus d8e5b806a8
All checks were successful
/ build-web (push) Successful in 6m38s
upload artifact can only be v3
2025-07-21 15:15:59 +02:00

52 lines
1.5 KiB
YAML

on:
push:
branches:
- main
jobs:
build-web:
runs-on: flutter-web-builder
steps:
- name: install node
id: node-install
run: |
apt update
apt install -y ca-certificates curl gnupg
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
apt update
apt install -y nodejs
flutter channel stable
flutter upgrade
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Flutter
id: cache-flutter
uses: actions/cache@v4
with:
path: ${{ forge.workspace }}/../.tool-cache
key: ${{ forge.ref_name }}-flutter-cache-temp
- name: Cache pub dependencies
uses: actions/cache@v4
id: cache-pub
with:
path: ${{ forge.workspace }}/../.pub-cache
key: ${{ forge.ref_name }}-pub-cache-temp
- name: Get dependencies
run: flutter pub get
- name: Build web
run: flutter build web --wasm --release
- name: List build output
run: ls -la build/web/
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: web-build
path: build/web/