Skip to content

Workflow file for this run

name: Laerdal Labs, DC GStreamer Plugin Windows Build
on:
push:
branches: [ master ]
release:
types: [released]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build-package:
name: Build Windows Nuget Package
runs-on: windows-2022
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
VCPKG_DEFAULT_TRIPLET: "x64-windows"
VCPKG_DOWNLOADS: "{{ github.workspace }}/.vcpkg/downloads"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install meson/ninja
run: pip install meson ninja
- name: Install GStreamer
id: setup_gstreamer
uses: blinemedical/setup-gstreamer@v1
with:
version: '1.22.7'
arch: 'x86_64'
- uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Cache vcpkg downloads
uses: actions/cache@v3
with:
path: ${{ env.VCPKG_BINARY_SOURCES }}
key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }}
- name: Install AWS C++ SDK
run: |
vcpkg install aws-sdk-cpp[s3,sts]
echo "CMAKE_PREFIX_PATH=$Env:VCPKG_INSTALLATION_ROOT\installed\x64-windows" | Out-File -FilePath $Env:GITHUB_ENV -Append -Encoding utf8
- name: Build Amazon-S3 Plugin
id: build_plugin
run: |
meson setup --vsenv build
echo "plugin_version=$((meson introspect --projectinfo build | ConvertFrom-Json).version)" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append -Encoding utf8
meson compile -C build
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
- name: Generate NuGet packages
run: |
mkdir nupkgs
$version = "${{ steps.build_plugin.outputs.plugin_version }}"
if ("${{ (startsWith(github.ref, 'refs/tags/v') || ( github.event_name == 'release' && github.event.action == 'released' )) }}" -ne "true") {
$version += "-dev.${{ github.run_number }}"
}
$version += "+g${{ github.sha }}".Substring(0, 7)
nuget.exe pack Amazon-S3-Plugin.nuspec -Version $version -OutputDirectory nupkgs
- name: Upload NuGet packages
uses: actions/upload-artifact@v3
with:
name: nuget-packages
path: 'nupkgs/*.nupkg'
- name: Publish
run: |
Get-ChildItem ./nupkgs -filter "*.nupkg" | foreach{
dotnet nuget push $_.FullName --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/blinemedical/index.json
}