forked from amzn/amazon-s3-gst-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 2.14 KB
/
build-windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Laerdal Labs, DC GStreamer Plugin Windows Build
on:
push:
branches: [ master ]
release:
types: [released, published]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build-package:
name: Build Windows Nuget Package
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
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: Install AWS C++ SDK
run: |
vcpkg install aws-sdk-cpp[s3,sts] --binarysource="clear;x-gha,readwrite"
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
nuget.exe pack amazon-s3-gst-plugin.nuspec -Version ${{ steps.build_plugin.outputs.plugin_version }}.${{ github.run_number }} -OutputDirectory nupkgs
- name: Publish
if: startsWith(github.ref, 'refs/tags/v')
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
}