name: CI env: protoc_version: '3.x' on: push: branches: [master, feature.*] tags: ['**'] pull_request: jobs: dart_tests: name: "Dart tests | Dart ${{ matrix.dart_channel }} | ${{ matrix.os }}" runs-on: "${{ matrix.os }}" strategy: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] dart_channel: [stable] include: [{os: ubuntu-latest, dart_channel: dev}] steps: - uses: actions/checkout@v2 - uses: arduino/setup-protoc@v1 with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" } - uses: cedx/setup-dart@v2 with: {release-channel: "${{ matrix.dart_channel }}"} - run: dart pub get - run: dart pub run grinder protobuf - run: dart pub run grinder pkg-standalone-dev - name: Run tests run: dart pub run test -r expanded static_analysis: name: Static analysis runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: arduino/setup-protoc@v1 with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" } - uses: cedx/setup-dart@v2 - run: dart pub get - run: dart pub run grinder protobuf - name: Analyze dart run: dartanalyzer --fatal-warnings ./ deploy_github_linux: name: "Deploy Github: Linux" runs-on: ubuntu-latest needs: [dart_tests, static_analysis] if: "startsWith(github.ref, 'refs/tags/') && github.repository == 'sass/dart-sass-embedded'" steps: - uses: actions/checkout@v2 - uses: arduino/setup-protoc@v1 with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" } - uses: cedx/setup-dart@v2 - run: dart pub get - run: dart pub run grinder protobuf - name: Deploy run: dart pub run grinder pkg-github-release pkg-github-linux env: {GH_BEARER_TOKEN: "${{ github.token }}"} deploy_github_macos: name: "Deploy Github: Mac OS" runs-on: macos-latest needs: [deploy_github_linux] if: "startsWith(github.ref, 'refs/tags/') && github.repository == 'sass/dart-sass-embedded'" steps: - uses: actions/checkout@v2 - uses: arduino/setup-protoc@v1 with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" } - uses: cedx/setup-dart@v2 - run: dart pub get - run: dart pub run grinder protobuf - name: Deploy run: dart pub run grinder pkg-github-macos env: {GH_BEARER_TOKEN: "${{ github.token }}"} deploy_github_windows: name: "Deploy Github: Windows" runs-on: windows-latest needs: [deploy_github_linux] if: "startsWith(github.ref, 'refs/tags/') && github.repository == 'sass/dart-sass-embedded'" steps: - uses: actions/checkout@v2 - uses: arduino/setup-protoc@v1 with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" } - uses: cedx/setup-dart@v2 - run: dart pub get - run: dart pub run grinder protobuf - name: Deploy run: dart pub run grinder pkg-github-windows env: {GH_BEARER_TOKEN: "${{ github.token }}"}