-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (35 loc) · 1.65 KB
/
Mac.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
name: MAC Signing
on:
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
include-prerelease: true
- name: dotnet publish
run: dotnet publish ConsoleApp1/ConsoleApp1.csproj -c Release -r osx-x64 -p:UseAppHost=true -p:PublishSingleFile=true --self-contained true -p:PublishReadyToRunShowWarnings=true -o ${{env.DOTNET_ROOT}}/consoleapp
- name: delete .pdb
run: rm ${{env.DOTNET_ROOT}}/consoleapp/*.pdb
- name: chmod
run: chmod +x ${{env.DOTNET_ROOT}}/consoleapp/ConsoleApp1
- name: Add Cert to Keychain
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.MAC_CERT_BASE64 }}
p12-password: ${{ secrets.MAC_CERT_PASSWORD }}
- name: Sign Binaries
run: "sh BuildAndReleaseScripts/SignMac.sh \"${{env.DOTNET_ROOT}}/consoleapp/ConsoleApp1\" \"${{env.DOTNET_ROOT}}/consoleapp/*\" \"Developer ID Application: CodingFlamingo (HVPR40Y9IG)\" \"BuildAndReleaseScripts/entitlements.plist\""
- name: Zip Binary for Notarizing
run: zip -rj consoleapp.zip ${{env.DOTNET_ROOT}}/consoleapp/*
- name: Notarize Binaries
run: "sh BuildAndReleaseScripts/Notarize.sh \"codingflamingo@gmail.com\" \"${{ secrets.MAC_DEV_PASSWORD }}\" \"group.com.codingflamingo\" \"HVPR40Y9IG\" \"./consoleapp.zip\""
- name: Upload artifact for deployment job
uses: actions\upload-artifact@v2
with:
name: MyConsoleApp-MacOS
path: ${{env.DOTNET_ROOT}}/consoleapp