Skip to content

fix(node): refine artifact validation to ignore generic index.node #16

fix(node): refine artifact validation to ignore generic index.node

fix(node): refine artifact validation to ignore generic index.node #16

name: Release Flutter SDK
# Triggered by version tags: v1.2.3
on:
push:
tags: ["v*.*.*"]
# The Flutter SDK ships Dart code + Rust FFI source to pub.dev.
# The Rust native library (.so / .dylib / .a) is compiled by the consuming
# app's build system via cargokit / flutter_rust_bridge conventions, so no
# pre-built binary is uploaded here.
jobs:
publish:
name: Publish to pub.dev
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install Flutter (stable)
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install Dart dependencies
working-directory: sdks/flutter/dart
run: dart pub get
- name: Validate package integrity
working-directory: sdks/flutter/dart
run: |
# Manually trigger bundling
node scripts/bundle-rust.js
# Check for critical files
if [ ! -d "rust-core/src" ]; then echo "Error: rust-core missing!"; exit 1; fi
if [ ! -d "rust/src" ]; then echo "Error: Bridge source missing!"; exit 1; fi
# Satisfy dart pub's "clean git state" requirement
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git add .
git commit -m "chore: temporary commit for release packaging"
echo "Flutter package integrity and git state verified."
- name: Set up pub.dev credentials
run: |
mkdir -p ~/.config/dart
echo '${{ secrets.PUB_CREDENTIALS }}' > ~/.config/dart/pub-credentials.json
- name: Validate pub.dev score (dry run)
working-directory: sdks/flutter/dart
run: dart pub publish --dry-run
- name: Publish to pub.dev
working-directory: sdks/flutter/dart
run: dart pub publish --force