diff --git a/.github/workflows/auto_publish.yaml b/.github/workflows/auto_publish.yaml new file mode 100644 index 0000000..0efef1b --- /dev/null +++ b/.github/workflows/auto_publish.yaml @@ -0,0 +1,18 @@ + +name: Publish + +on: + push: + tags: + # Releases + - '[0-9]+.[0-9]+.[0-9]+' + +permissions: + contents: write + id-token: write + pull-requests: write + +jobs: + publish: + name: Publish to pub.dev + uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 \ No newline at end of file diff --git a/.github/workflows/dart_ci.yaml b/.github/workflows/dart_ci.yaml index f05d155..a987fb4 100644 --- a/.github/workflows/dart_ci.yaml +++ b/.github/workflows/dart_ci.yaml @@ -9,6 +9,11 @@ on: branches: - '**' +permissions: + contents: write + id-token: write + pull-requests: write + jobs: test: runs-on: ubuntu-latest @@ -16,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [ 2.18.7, 2.19.6, stable ] + sdk: [ 2.19.6 ] steps: - uses: actions/checkout@v2 - uses: dart-lang/setup-dart@v1 @@ -26,10 +31,15 @@ jobs: run: dart pub get - name: Verify formatting run: dart format --output=none --set-exit-if-changed . - if: ${{ matrix.sdk == '2.18.7' }} + if: ${{ matrix.sdk == '2.19.6' }} - name: Analyze project source run: dart analyze - name: Run tests on chrome run: dart run build_runner test --delete-conflicting-outputs -- -p chrome - name: Run tests in release mode on chrome run: dart run build_runner test --release --delete-conflicting-outputs -- -p chrome + - name: Publish SBOM + uses: anchore/sbom-action@v0 + with: + path: ./ + format: cyclonedx-json \ No newline at end of file