fix test #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to pub.dev and release | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag pattern on pub.dev: 'v{{version}' | |
- 'dartcv4-v[0-9]+.[0-9]+.[0-9]+*' | |
# pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: robinraju/[email protected] | |
with: | |
repository: "rainyl/opencv_dart" | |
tag: "dnn_test_files" | |
fileName: "models.zip" | |
out-file-path: "packages/dartcv/test/" | |
extract: true | |
- uses: robinraju/[email protected] | |
with: | |
repository: "rainyl/dartcv" | |
latest: true | |
fileName: "libdartcv-linux-x64.tar.gz" | |
out-file-path: "packages/dartcv/libdartcv" | |
extract: true | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: test | |
env: | |
LD_LIBRARY_PATH: "${{github.workspace}}/packages/dartcv/libdartcv/lib" | |
run: | | |
cd "${{github.workspace}}/packages/dartcv" | |
dart test -x skip-workflow | |
publish-dartcv4: | |
name: Publish dartcv4 | |
if: startsWith(github.ref, 'refs/tags/dartcv4-v') | |
needs: [test] | |
permissions: | |
id-token: write # Required for authentication using OIDC | |
runs-on: ubuntu-latest | |
environment: pub.dev | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dart-lang/setup-dart@v1 | |
- name: Install dependencies | |
working-directory: packages/dartcv | |
run: dart pub get | |
- name: Publish | |
working-directory: packages/dartcv | |
run: dart pub publish --force | |
publish-opencv-core: | |
if: startsWith(github.ref, 'refs/tags/v') | |
name: Publish opencv_core | |
needs: [test] | |
permissions: | |
id-token: write # Required for authentication using OIDC | |
runs-on: ubuntu-latest | |
environment: pub.dev | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dart-lang/setup-dart@v1 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: Install dependencies | |
working-directory: packages/opencv_core | |
run: flutter pub get | |
- name: Publish | |
working-directory: packages/opencv_core | |
run: flutter pub publish --force | |
publish-opencv-dart: | |
if: startsWith(github.ref, 'refs/tags/v') | |
name: Publish opencv_dart | |
needs: [test] | |
permissions: | |
id-token: write # Required for authentication using OIDC | |
runs-on: ubuntu-latest | |
environment: pub.dev | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dart-lang/setup-dart@v1 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: Install dependencies | |
working-directory: packages/opencv_dart | |
run: flutter pub get | |
- name: Publish | |
working-directory: packages/opencv_dart | |
run: flutter pub publish --force | |
release: | |
needs: [test, publish-opencv-dart, publish-opencv-core] | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: false | |
prerelease: false | |
generate_release_notes: true |