Files
loongyan/.gitea/workflows/dart-ci.yml
lzw-723 1441e25e6f
Some checks failed
Dart CI / build (push) Failing after 2s
工作流产物上传制品库
2026-04-03 21:52:53 +08:00

45 lines
1013 B
YAML

name: Dart CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Dart SDK
uses: dart-lang/setup-dart@v1
with:
sdk: 'stable' # 可选: stable, beta, dev 或具体版本如 3.3.0
- name: Install dependencies
run: dart pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze project source
run: dart analyze
- name: Run tests
run: dart test
- name: Prepare build directory
run: mkdir -p build
- name: Build executable
run: dart compile exe bin/server.dart -o build/loongyan
- name: Upload to Gitea Artifacts
uses: gitea.com/actions/gitea-upload-artifact@v4
with:
name: loongyan-${{ github.sha }}
path: build/loongyan
retention-days: 30