From 1ae188aad1140807c4aca02b9ce2822183161227 Mon Sep 17 00:00:00 2001
From: Rob Becker
Date: Tue, 16 Apr 2024 10:35:02 -0600
Subject: [PATCH 1/2] fix up GHA workflows
---
.github/workflows/auto_publish.yaml | 18 ++++++++++++++++++
.github/workflows/dart_ci.yaml | 14 ++++++++++++--
2 files changed, 30 insertions(+), 2 deletions(-)
create mode 100644 .github/workflows/auto_publish.yaml
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..f21baf0 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, stable ]
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
From 438e384382a1c96a0e5ef0713c9003187fdcebe8 Mon Sep 17 00:00:00 2001
From: Rob Becker
Date: Tue, 16 Apr 2024 10:56:13 -0600
Subject: [PATCH 2/2] remove stable from matrix too
---
.github/workflows/dart_ci.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/dart_ci.yaml b/.github/workflows/dart_ci.yaml
index f21baf0..a987fb4 100644
--- a/.github/workflows/dart_ci.yaml
+++ b/.github/workflows/dart_ci.yaml
@@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- sdk: [ 2.19.6, stable ]
+ sdk: [ 2.19.6 ]
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1