Skip to content

Changed load options to enum, #10

Changed load options to enum,

Changed load options to enum, #10

Workflow file for this run

name: Publish Dart Packages
on:
push:
branches:
- main
paths:
- 'wasm_ffi/CHANGELOG.md'
- 'universal_ffi/CHANGELOG.md'
jobs:
analyze-and-publish:
name: Analyze and Publish Dart Packages
runs-on: ubuntu-latest
strategy:
matrix:
package:
- wasm_ffi
- universal_ffi
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
channel: stable
- name: Check if relevant CHANGELOG is updated
id: changes
run: |
if [[ ! $(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep "^${{ matrix.package }}/CHANGELOG.md$") ]]; then
echo "skip=true" >> $GITHUB_ENV
fi
- name: Analyze ${{ matrix.package }}
if: env.skip != 'true'
run: |
cd ${{ matrix.package }}
dart pub get
dart analyze
dart test
- name: Publish ${{ matrix.package }} (if valid)
if: env.skip != 'true'
env:
PUB_TOKEN: ${{ secrets.PUB_TOKEN }}
run: |
cd ${{ matrix.package }}
# Validate the package
dart pub publish --dry-run
# Publish the package if validation succeeds
echo "Publishing ${{ matrix.package }} to pub.dev..."
# dart pub publish --force