From 7071b1c30dd17e2ccd390e80ddb0b2c00c6b634c Mon Sep 17 00:00:00 2001 From: Rob Becker Date: Wed, 29 May 2024 14:04:54 -0600 Subject: [PATCH 1/5] Just use Dart 2.19.6 in CI --- .github/workflows/dart_ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dart_ci.yml b/.github/workflows/dart_ci.yml index 615e95907..65dd3e33a 100644 --- a/.github/workflows/dart_ci.yml +++ b/.github/workflows/dart_ci.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: # Can't run on `dev` (Dart 3) until we're fully null-safe. - sdk: [ 2.18.7, 2.19.6 ] + sdk: [ 2.19.6 ] steps: - uses: actions/checkout@v2 - uses: dart-lang/setup-dart@v0.2 @@ -39,7 +39,7 @@ jobs: - name: Verify formatting run: dart run dart_dev format --check # Only run on one sdk version in case there are conflicts - if: always() && matrix.sdk != '2.18.7' && steps.install.outcome == 'success' + if: always() && matrix.sdk != '2.19.6' && steps.install.outcome == 'success' # Analyze before generated files are created to verify that component boilerplate analysis is "clean" without the need for building - name: Analyze example source (pre-build) @@ -59,7 +59,7 @@ jobs: - name: Verify that generated files are up-to-date run: | - if [ ${{ matrix.sdk }} = '2.18.7' ]; then + if [ ${{ matrix.sdk }} = '2.19.6' ]; then git diff --exit-code else # Don't check these generated files for other SDKs, since they may generate differently @@ -98,7 +98,7 @@ jobs: fail-fast: false matrix: # Can't run on `dev` (Dart 3) until we're fully null-safe. - sdk: [ 2.18.7, 2.19.6 ] + sdk: [ 2.19.6 ] analyzer: # We only have one version currently, but we'll leave this CI step in place # for the next time we need to support multiple analyzer versions. From a3182a9f45ec91424a778ee0bbaec254664e4a3a Mon Sep 17 00:00:00 2001 From: Rob Becker Date: Wed, 29 May 2024 14:12:34 -0600 Subject: [PATCH 2/5] strip out mockito references --- .github/workflows/dart_ci.yml | 2 +- build.yaml | 4 ---- dart_dependency_validator.yaml | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/dart_ci.yml b/.github/workflows/dart_ci.yml index 65dd3e33a..69645a33c 100644 --- a/.github/workflows/dart_ci.yml +++ b/.github/workflows/dart_ci.yml @@ -64,7 +64,7 @@ jobs: else # Don't check these generated files for other SDKs, since they may generate differently # due to different resolved dependencies. - git diff --exit-code -- ":(exclude)test/mockito.mocks.dart" ":(exclude)test/over_react/component_declaration/redux_component_test/test_reducer.g.dart" + git diff --exit-code -- ":(exclude)test/over_react/component_declaration/redux_component_test/test_reducer.g.dart" fi if: always() && steps.install.outcome == 'success' && steps.install.build == 'success' diff --git a/build.yaml b/build.yaml index a6ff282d9..04bbb6428 100644 --- a/build.yaml +++ b/build.yaml @@ -17,10 +17,6 @@ builders: targets: $default: builders: - mockito:mockBuilder: - generate_for: - include: - - "test/mockito.dart" over_react|_over_react_local_builder: enabled: true generate_for: diff --git a/dart_dependency_validator.yaml b/dart_dependency_validator.yaml index 4d67ba335..34e916731 100644 --- a/dart_dependency_validator.yaml +++ b/dart_dependency_validator.yaml @@ -1,6 +1,4 @@ exclude: - app/** - tools/** -ignore: - - mockito allow_pins: true \ No newline at end of file From fb81972ece895126c9ef1d16100c375812cd9f26 Mon Sep 17 00:00:00 2001 From: Rob Becker Date: Wed, 29 May 2024 14:14:44 -0600 Subject: [PATCH 3/5] update checkout and setup-dart versions --- .github/workflows/dart_ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dart_ci.yml b/.github/workflows/dart_ci.yml index 69645a33c..51cf02b87 100644 --- a/.github/workflows/dart_ci.yml +++ b/.github/workflows/dart_ci.yml @@ -20,8 +20,8 @@ jobs: # Can't run on `dev` (Dart 3) until we're fully null-safe. sdk: [ 2.19.6 ] steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.2 + - uses: actions/checkout@v4 + - uses: dart-lang/setup-dart@v1 with: sdk: ${{ matrix.sdk }} @@ -104,8 +104,8 @@ jobs: # for the next time we need to support multiple analyzer versions. - ^5.1.0 steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.2 + - uses: actions/checkout@v4 + - uses: dart-lang/setup-dart@v1 with: sdk: ${{ matrix.sdk }} @@ -140,8 +140,8 @@ jobs: # Can't run on `stable` (Dart 3) until we're fully null-safe. sdk: [ 2.19.6 ] steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.2 + - uses: actions/checkout@v4 + - uses: dart-lang/setup-dart@v1 with: sdk: ${{ matrix.sdk }} From 37ea54fece07f31ab96451b91d784eea06358796 Mon Sep 17 00:00:00 2001 From: Rob Becker Date: Wed, 29 May 2024 14:26:29 -0600 Subject: [PATCH 4/5] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02e5a1a15..f413c5b8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ # OverReact Changelog +## 5.1.1 & 5.1.2 +- Fixes to CI [#921] [#922] ## 5.1.0 - [#910] / [#916] Add null safety migration / component authoring guides. From c3ab958a17723f10853f33d49f272706551243d7 Mon Sep 17 00:00:00 2001 From: Rob Becker Date: Wed, 29 May 2024 14:32:10 -0600 Subject: [PATCH 5/5] Add auto-publish --- .github/workflows/publish.yml | 41 +++++++++++++++++++++++++++++++++++ CHANGELOG.md | 1 + 2 files changed, 42 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..e6d552a18 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,41 @@ +name: Publish + +on: + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' + +permissions: + contents: write + id-token: write + pull-requests: write + +jobs: + create-sbom-release-asset: + name: Create SBOM Release Asset + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Publish SBOM to Release Assets + uses: anchore/sbom-action@v0 + with: + path: ./ + format: cyclonedx-json + + publish: + name: Publish to pub.dev + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dart-lang/setup-dart@v1 + with: + sdk: 2.19.6 + + - name: Install dependencies + run: dart pub get + + - name: Publish - dry run + run: dart pub publish --dry-run + + - name: Publish + run: dart pub publish -f \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f413c5b8f..456aec5ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # OverReact Changelog ## 5.1.1 & 5.1.2 - Fixes to CI [#921] [#922] +- Add auto-publish to pub.dev ## 5.1.0 - [#910] / [#916] Add null safety migration / component authoring guides.