This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
121 lines (106 loc) · 5.41 KB
/
package.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Package Artifacts
on:
- workflow_dispatch
- workflow_call
jobs:
build-runtimes:
name: build-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [macos-latest, windows-latest]
include:
- os: macos-latest
shell: bash
runtime: DolbyIO.Comms.Sdk.Runtime.Osx
- os: windows-latest
shell: powershell
runtime: DolbyIO.Comms.Sdk.Runtime.Win
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/configure
with:
shell: ${{ matrix.shell }}
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . -t DolbyIO.Comms.Native
- if: ${{matrix.os == 'macos-latest'}}
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
IAPI_DOTNET_APP_SPECYFIC_PASSWORD: ${{ secrets.IAPI_DOTNET_APP_SPECYFIC_PASSWORD }}
working-directory: ${{github.workspace}}/build/bin
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
xcrun notarytool store-credentials "dotnet-sdk-notarization-profile" --apple-id "iapi@dolby.com" --team-id B55NRA8BRW --password "${IAPI_DOTNET_APP_SPECYFIC_PASSWORD}"
codesign --force --strict --timestamp --sign 'Developer ID Application: VOXEET INC. (B55NRA8BRW)' *.dylib
- if: ${{matrix.os == 'windows-latest'}}
working-directory: ${{github.workspace}}/build/bin
run: |
echo "${{ secrets.WINDOWS_CERTIFICATE }}" > data.b64
certutil -decode data.b64 certificate.pfx
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f ./certificate.pfx /p ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD}} /t http://timestamp.digicert.com/ DolbyIO.Comms.Sdk.dll
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f ./certificate.pfx /p ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD}} /t http://timestamp.digicert.com/ DolbyIO.Comms.Native.dll
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f ./certificate.pfx /p ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD}} /t http://timestamp.digicert.com/ dolbyio_comms_sdk.dll
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f ./certificate.pfx /p ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD}} /t http://timestamp.digicert.com/ dolbyio_comms_media.dll
Remove-Item -Recurse -Force certificate.pfx
- name: Pack
working-directory: ${{github.workspace}}/build
run: dotnet pack dotnet/${{ matrix.runtime }}/${{ matrix.runtime }}.csproj
- uses: actions/upload-artifact@v3
with:
name: nugets
path: ${{github.workspace}}/build/bin/${{ matrix.runtime }}.*.nupkg
build-packages:
runs-on: macos-latest
needs: [build-runtimes]
steps:
- uses: actions/checkout@v2
with:
submodules: true
lfs: true
- uses: ./.github/actions/configure
- uses: actions/download-artifact@v3
with:
name: nugets
path: ${{ github.workspace }}/build/bin
- run: cmake --build .
working-directory: ${{github.workspace}}/build
- run: dotnet pack dotnet/DolbyIO.Comms.Sdk/DolbyIO.Comms.Sdk.csproj
working-directory: ${{github.workspace}}/build
- name: Sign Nugets
working-directory: ${{github.workspace}}/build/bin
run: |
echo "${{ secrets.WINDOWS_CERTIFICATE }}" | base64 --decode > certificate.pfx
dotnet nuget sign DolbyIO.Comms.Sdk.*.nupkg --certificate-path ./certificate.pfx --certificate-password ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD}} --timestamper http://timestamp.digicert.com/
rm certificate.pfx
- uses: actions/upload-artifact@v3
with:
name: nugets
path: ${{github.workspace}}/build/bin/DolbyIO.Comms.Sdk.*.nupkg
- run: dotnet publish dotnet/DolbyCMD/DolbyCMD.csproj -o CmdLine
working-directory: ${{github.workspace}}/build
- uses: actions/upload-artifact@v3
with:
name: CmdLine
path: ${{github.workspace}}/build/CmdLine/
- run: 7z x "${{github.workspace}}/build/bin/DolbyIO.Comms.Sdk.Runtime.*.nupkg" -o${{github.workspace}}/build "runtimes/*"
working-directory: ${{github.workspace}}/build
- uses: actions/upload-artifact@v3
with:
name: dolbyio-dotnet-binaries
path: ${{github.workspace}}/build/runtimes/