Skip to content

Revise contribution instructions for OpenCV modules #54

Revise contribution instructions for OpenCV modules

Revise contribution instructions for OpenCV modules #54

Workflow file for this run

name: Publish to pub.dev and release

Check failure on line 1 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

(Line: 100, Col: 13): Job 'publish-opencv-dart' depends on unknown job 'test'., (Line: 118, Col: 52): Job 'release' depends on job 'publish-opencv-dart' which creates a cycle in the dependency graph.
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag pattern on pub.dev: 'v{{version}'
# pull_request:
jobs:
test-ubuntu:
name: test-ubuntu
runs-on: ubuntu-latest
steps:
- name: setup
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev
- uses: actions/checkout@v4
with:
submodules: true
- uses: subosito/flutter-action@v2
with:
channel: "main"
- uses: robinraju/[email protected]
with:
repository: "rainyl/opencv_dart"
tag: "dnn_test_files"
fileName: "models.zip"
out-file-path: "test/"
extract: true
- name: Run Test
run: |
dart pub get
dart test -x skip-workflow
test-windows:
name: test-windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: subosito/flutter-action@v2
with:
channel: "main"
- uses: robinraju/[email protected]
with:
repository: "rainyl/opencv_dart"
tag: "dnn_test_files"
fileName: "models.zip"
out-file-path: "test/"
extract: true
- name: Run Test
shell: pwsh
run: |
dart pub get
dart test -x skip-workflow
test-macos:
name: test-macos
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: subosito/flutter-action@v2
with:
channel: "main"
- uses: robinraju/[email protected]
with:
repository: "rainyl/opencv_dart"
tag: "dnn_test_files"
fileName: "models.zip"
out-file-path: "test/"
extract: true
- name: Run Test
run: |
dart pub get
dart test -x skip-workflow
publish-dartcv4:
name: Publish dartcv4
if: startsWith(github.ref, 'refs/tags/v')
needs: [test-ubuntu, test-windows, test-macos]
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-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-ubuntu, test-windows, test-macos, publish-opencv-dart]
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