From 7420076fe6061161c082fc0c30ef93707db6b8fd Mon Sep 17 00:00:00 2001 From: Hossein Yousefi Date: Fri, 1 Sep 2023 13:33:07 +0200 Subject: [PATCH] Configure autopublishing (#380) --- .github/{dependabot.yml => dependabot.yaml} | 0 .github/workflows/publish.yaml | 19 +++++++++++++++++++ .../{test-package.yml => test-package.yaml} | 0 jni/example/pubspec.lock | 2 +- jni/example/pubspec.yaml | 2 +- jni/pubspec.yaml | 2 +- jnigen/android_test_runner/pubspec.yaml | 2 +- jnigen/example/in_app_java/pubspec.yaml | 2 +- .../kotlin_plugin/example/pubspec.yaml | 2 +- jnigen/example/kotlin_plugin/pubspec.yaml | 2 +- .../notification_plugin/example/pubspec.yaml | 2 +- .../example/notification_plugin/pubspec.yaml | 2 +- .../pdfbox_plugin/dart_example/pubspec.yaml | 2 +- .../pdfbox_plugin/example/pubspec.yaml | 2 +- jnigen/example/pdfbox_plugin/pubspec.yaml | 2 +- jnigen/pubspec.yaml | 2 +- 16 files changed, 32 insertions(+), 13 deletions(-) rename .github/{dependabot.yml => dependabot.yaml} (100%) create mode 100644 .github/workflows/publish.yaml rename .github/workflows/{test-package.yml => test-package.yaml} (100%) diff --git a/.github/dependabot.yml b/.github/dependabot.yaml similarity index 100% rename from .github/dependabot.yml rename to .github/dependabot.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 00000000..995c19b9 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,19 @@ +# A CI configuration to auto-publish pub packages. + +name: Publish + +on: + pull_request: + branches: [ main ] + push: + tags: [ '[A-z]+-v[0-9]+.[0-9]+.[0-9]+' ] + +jobs: + publish: + if: ${{ github.repository_owner == 'dart-lang' }} + uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main + with: + use-flutter: true # Since package:jni uses Flutter. + permissions: + id-token: write # Required for authentication using OIDC + pull-requests: write # Required for writing the pull request note diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yaml similarity index 100% rename from .github/workflows/test-package.yml rename to .github/workflows/test-package.yaml diff --git a/jni/example/pubspec.lock b/jni/example/pubspec.lock index f70135ea..1df31a67 100644 --- a/jni/example/pubspec.lock +++ b/jni/example/pubspec.lock @@ -519,5 +519,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.1.0-262.3.beta <4.0.0" + dart: ">=3.1.0 <4.0.0" flutter: ">=2.11.0" diff --git a/jni/example/pubspec.yaml b/jni/example/pubspec.yaml index 7972e84f..ce064648 100644 --- a/jni/example/pubspec.yaml +++ b/jni/example/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.1.0-262.3.beta <4.0.0' + sdk: '>=3.1.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/jni/pubspec.yaml b/jni/pubspec.yaml index c2695204..e161103a 100644 --- a/jni/pubspec.yaml +++ b/jni/pubspec.yaml @@ -15,7 +15,7 @@ topics: - jni environment: - sdk: '>=3.1.0-262.3.beta <4.0.0' + sdk: '>=3.1.0 <4.0.0' flutter: '>=2.11.0' dependencies: diff --git a/jnigen/android_test_runner/pubspec.yaml b/jnigen/android_test_runner/pubspec.yaml index 87e47951..fccc86e4 100644 --- a/jnigen/android_test_runner/pubspec.yaml +++ b/jnigen/android_test_runner/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.1.0-262.3.beta <4.0.0' + sdk: '>=3.1.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/jnigen/example/in_app_java/pubspec.yaml b/jnigen/example/in_app_java/pubspec.yaml index f99aa5d5..321cc99b 100644 --- a/jnigen/example/in_app_java/pubspec.yaml +++ b/jnigen/example/in_app_java/pubspec.yaml @@ -8,7 +8,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.1.0-262.3.beta <4.0.0' + sdk: '>=3.1.0 <4.0.0' dependencies: flutter: diff --git a/jnigen/example/kotlin_plugin/example/pubspec.yaml b/jnigen/example/kotlin_plugin/example/pubspec.yaml index 53ef1e32..4c1c7965 100644 --- a/jnigen/example/kotlin_plugin/example/pubspec.yaml +++ b/jnigen/example/kotlin_plugin/example/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: "none" version: 1.0.0+1 environment: - sdk: '>=3.1.0-262.3.beta <4.0.0' + sdk: '>=3.1.0 <4.0.0' dependencies: flutter: diff --git a/jnigen/example/kotlin_plugin/pubspec.yaml b/jnigen/example/kotlin_plugin/pubspec.yaml index 4396ff59..fd89ad6c 100644 --- a/jnigen/example/kotlin_plugin/pubspec.yaml +++ b/jnigen/example/kotlin_plugin/pubspec.yaml @@ -8,7 +8,7 @@ version: 0.0.1 publish_to: none environment: - sdk: '>=3.1.0-262.3.beta <4.0.0' + sdk: '>=3.1.0 <4.0.0' flutter: ">=1.17.0" dependencies: diff --git a/jnigen/example/notification_plugin/example/pubspec.yaml b/jnigen/example/notification_plugin/example/pubspec.yaml index 10478f0e..35f3357f 100644 --- a/jnigen/example/notification_plugin/example/pubspec.yaml +++ b/jnigen/example/notification_plugin/example/pubspec.yaml @@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.1.0-262.3.beta <4.0.0' + sdk: '>=3.1.0 <4.0.0' dependencies: flutter: diff --git a/jnigen/example/notification_plugin/pubspec.yaml b/jnigen/example/notification_plugin/pubspec.yaml index a0e0a6af..1f6cf492 100644 --- a/jnigen/example/notification_plugin/pubspec.yaml +++ b/jnigen/example/notification_plugin/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: none homepage: https://github.com/dart-lang/jnigen environment: - sdk: '>=3.1.0-262.3.beta <4.0.0' + sdk: '>=3.1.0 <4.0.0' flutter: ">=2.11.0" dependencies: diff --git a/jnigen/example/pdfbox_plugin/dart_example/pubspec.yaml b/jnigen/example/pdfbox_plugin/dart_example/pubspec.yaml index 8b8a4ef3..4af3cf1f 100644 --- a/jnigen/example/pdfbox_plugin/dart_example/pubspec.yaml +++ b/jnigen/example/pdfbox_plugin/dart_example/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: none # homepage: https://www.example.com environment: - sdk: '>=3.1.0-262.3.beta <4.0.0' + sdk: '>=3.1.0 <4.0.0' dependencies: path: ^1.8.0 diff --git a/jnigen/example/pdfbox_plugin/example/pubspec.yaml b/jnigen/example/pdfbox_plugin/example/pubspec.yaml index 47993e6b..13d0df00 100644 --- a/jnigen/example/pdfbox_plugin/example/pubspec.yaml +++ b/jnigen/example/pdfbox_plugin/example/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.1.0-262.3.beta <4.0.0' + sdk: '>=3.1.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/jnigen/example/pdfbox_plugin/pubspec.yaml b/jnigen/example/pdfbox_plugin/pubspec.yaml index c6bb9208..a269d5a6 100644 --- a/jnigen/example/pdfbox_plugin/pubspec.yaml +++ b/jnigen/example/pdfbox_plugin/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: none homepage: https://github.com/dart-lang/jnigen environment: - sdk: '>=3.1.0-262.3.beta <4.0.0' + sdk: '>=3.1.0 <4.0.0' #flutter: ">=2.11.0" dependencies: diff --git a/jnigen/pubspec.yaml b/jnigen/pubspec.yaml index b68d371a..62fbc937 100644 --- a/jnigen/pubspec.yaml +++ b/jnigen/pubspec.yaml @@ -8,7 +8,7 @@ version: 0.6.0 repository: https://github.com/dart-lang/jnigen/tree/main/jnigen environment: - sdk: ">=3.1.0-262.3.beta <4.0.0" + sdk: ">=3.1.0 <4.0.0" topics: - interop