feat: add JSON string support for ABAC enforcement #138
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Dart CI | |
| on: | |
| # Run on PRs and pushes to the master branch. | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| env: | |
| PUB_ENVIRONMENT: bot.github | |
| jobs: | |
| # Check code formatting and static analysis on Ubuntu. | |
| analyze: | |
| runs-on: ubuntu-20.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sdk: [stable] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: dart-lang/setup-dart@v1.0 | |
| with: | |
| sdk: ${{ matrix.sdk }} | |
| - id: install | |
| name: Install dependencies | |
| run: dart pub get | |
| - name: Check formatting | |
| run: dart format --output=none --set-exit-if-changed . | |
| # runs dart test | |
| test: | |
| needs: analyze | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: dart-lang/setup-dart@v1.0 | |
| with: | |
| sdk: stable | |
| - name: Install dependencies | |
| run: dart pub get | |
| - name: Run VM tests | |
| run: dart test --platform vm | |
| # release on Github and pub.dev | |
| publish: | |
| needs: test | |
| if: github.repository == 'casbin/dart-casbin' && github.event_name == 'push' | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: cedx/setup-dart@v2 | |
| - uses: actions/setup-node@v2 | |
| with: | |
| node-version: 14 | |
| - run: npm install -g "@semantic-release/changelog" | |
| - run: npm install -g "@semantic-release/git" | |
| - run: npm install -g "pub-semantic-release" | |
| - name: Semantic Release | |
| run: | | |
| export NODE_PATH="$(npm root -g)" | |
| npx semantic-release@17 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to pub | |
| run: dart pub publish --dry-run | |
| - uses: sakebook/actions-flutter-pub-publisher@v1.3.1 | |
| with: | |
| package_directory: ${{ matrix.package }} | |
| credential: ${{ secrets.PUB_CREDENTIALS }} | |
| flutter_package: true | |
| skip_test: true |