chore(ci): pin actions, harden credentials, scope permissions (#1) #5
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quality: | |
| name: Dart stable (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| with: | |
| persist-credentials: false | |
| - uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1 | |
| with: | |
| sdk: stable | |
| - name: Resolve workspace | |
| run: dart pub get | |
| - name: Bootstrap packages | |
| run: dart run melos bootstrap | |
| - name: Check formatting | |
| run: dart format --output=none --set-exit-if-changed . | |
| - name: Analyze | |
| run: dart analyze | |
| - name: Test | |
| run: dart run melos run test --no-select | |
| minimum-sdk: | |
| name: Dart 3.5 compatibility | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| with: | |
| persist-credentials: false | |
| - uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1 | |
| with: | |
| sdk: 3.5.4 | |
| - name: Resolve workspace | |
| run: dart pub get | |
| - name: Bootstrap packages | |
| run: dart run melos bootstrap | |
| - name: Analyze | |
| run: dart analyze | |
| - name: Test | |
| run: dart run melos run test --no-select | |
| publish-dry-run: | |
| name: Publish dry-run (${{ matrix.package }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: [acpd, acpd_io, acpd_http, acpd_test] | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| with: | |
| persist-credentials: false | |
| - uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1 | |
| with: | |
| sdk: stable | |
| - name: Resolve workspace | |
| run: dart pub get | |
| - name: Bootstrap packages | |
| run: dart run melos bootstrap | |
| - name: Validate publish archive | |
| working-directory: packages/${{ matrix.package }} | |
| run: dart pub publish --dry-run |