diff --git a/.github/workflows/post_summaries.yaml b/.github/workflows/post_summaries.yaml new file mode 100644 index 0000000..7f28bce --- /dev/null +++ b/.github/workflows/post_summaries.yaml @@ -0,0 +1,16 @@ +# A CI configuration to write comments on PRs. + +name: Comment on the pull request + +on: + workflow_run: + workflows: + - Publish + types: + - completed + +jobs: + upload: + permissions: + pull-requests: write + uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..584ac10 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,16 @@ + +# A CI configuration to auto-publish pub packages. + +name: Publish + +on: + push: + tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ] + +jobs: + publish: + permissions: + id-token: write # Required for authentication using OIDC + uses: dart-lang/ecosystem/.github/workflows/publish.yaml@v1 + with: + write-comments: false \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index af989f6..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,22 +0,0 @@ - -name: Publish plugin - -on: - release: - types: [published] - -jobs: - publish: - - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Publish - uses: sakebook/actions-flutter-pub-publisher@v1.4.1 - with: - credential: ${{ secrets.CREDENTIAL_JSON }} - flutter_package: true - skip_test: false - dry_run: false diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yaml similarity index 53% rename from .github/workflows/run_tests.yml rename to .github/workflows/run_tests.yaml index f2b6bbb..d172f37 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yaml @@ -1,16 +1,18 @@ name: Test all code changes -on: [push] +on: [ push ] jobs: build: - + strategy: + matrix: + dart_version: [ 2.14,2.15,2.16,2.17,2.18,2.19,3.0,3.1,3.2 ] runs-on: ubuntu-latest container: - image: google/dart:latest + image: dart:${{ matrix.dart_version }} steps: - name: Checkout code for testing uses: actions/checkout@v4 - name: Run all tests in project - run: dart test test/ \ No newline at end of file + run: dart test test/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9969ff9..828e714 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,8 +11,8 @@ repos: - id: format-code name: Flutter format code always_run: true - entry: flutter - args: ["format", "."] + entry: dart + args: ["format", "--fix", "."] language: system types: [bash] - id: test-code diff --git a/CHANGELOG.md b/CHANGELOG.md index 8233dde..9f74df3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.1.0 + +- migrate to dart ecosystem publishing mechanisms @pitabwire (#14) +- introduce matrix testing for all supported versions @pitabwire (#14) +- cleanup precommit file ## 1.0.11 diff --git a/README.md b/README.md index 91a38ac..a35274b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Globally Unique ID Generator +[![Build Status](https://github.com/pitabwire/xid/actions/workflows/run_tests.yaml/badge.svg?branch=main)](https://github.com/pitabwire/xid/actions/workflows/run_tests.yaml) + > This project is a dart implementation of the Go Lang library found here: [https://github.com/rs/xid](https://github.com/rs/xid) __ReadMe is from that project (with some modifications for dart).__ diff --git a/pubspec.yaml b/pubspec.yaml index b03eaa9..d7125a1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,10 +3,10 @@ description: | Xid is a globally unique id generator. Xids are small, fast to generate, sortable, compact URL-safe string with no configuration or central generator server. -version: 1.0.12 +version: 1.1.0 repository: https://github.com/pitabwire/xid environment: - sdk: '>=2.14.4 <3.0.0' + sdk: ^2.14.4 dev_dependencies: lints: ^1.0.0