Fix NuGet package name #357
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: Linux ARM (Docker) | |
on: | |
pull_request: | |
types: [synchronize, opened] | |
push: | |
branches: | |
- main | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
OPENCV_VERSION: 4.8.0 | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/setup-buildx-action@v2 | |
with: | |
install: true | |
- uses: docker/setup-qemu-action@v2 | |
- name: Build with Docker | |
run: | | |
# Override OpenCV version in Dockerfile | |
docker build \ | |
-t opencvsharp-linux-arm:latest \ | |
--output=type=docker \ | |
--platform=linux/arm/v7 \ | |
--build-arg OPENCV_VERSION \ | |
./docker/ubuntu22-dotnet6-opencv4.8.0 | |
- name: Extract build files from Docker instance | |
run: | | |
docker create -ti --name opencvsharp-linux-arm-tmp opencvsharp-linux-arm bash | |
docker cp opencvsharp-linux-arm-tmp:/artifacts . | |
- name: Patch nuspec with version and build NuGet package | |
run: | | |
sed -E --in-place=.bak "s/<version>[0-9]\.[0-9]{1,2}\.[0-9]{1,2}.[0-9]{8}(-beta[0-9]*)?<\/version>/<version>${OPENCV_VERSION}.$(date '+%Y%m%d')<\/version>/" nuget/OpenCvSharp4.runtime.linux-arm.nuspec | |
cp artifacts/libOpenCvSharpExtern.so nuget/ | |
dotnet pack nuget/OpenCvSharp4.runtime.linux-arm.csproj -o artifacts_arm | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts_linux_arm | |
path: artifacts_arm |