-
Notifications
You must be signed in to change notification settings - Fork 9
75 lines (70 loc) · 3.25 KB
/
ci.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
name: CI
on: [push, pull_request]
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build:
name: ${{ matrix.platform.name }} ${{ matrix.dotnet.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- { name: MacOS, os: macos-12, rid: osx.12-x64 }
- { name: Windows VS2022, os: windows-2022, rid: win10-x64 }
dotnet:
- { name: .NET 6, version: '6.0.x' }
steps:
- uses: actions/checkout@v3
- name: Setup .NET ${{ matrix.dotnet.version }} SDK
id: setup-dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet.version }}
- name: Enforce SDK Version
run: dotnet new globaljson --sdk-version ${{ steps.setup-dotnet.outputs.dotnet-version }} --force
- name: Verify SDK Installation
run: dotnet --info
- name: Install Dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Publish
run: dotnet publish --runtime ${{ matrix.platform.rid }} --self-contained --configuration Release -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:IncludeNativeLibrariesForSelfExtract=true
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: clockify-${{ matrix.platform.os }}
path: bin/Publish/dev.duerrenberger.clockify.sdPlugin
package:
name: Package Builds
runs-on: macos-12
needs: build
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
- name: Clean Up Artifacts
shell: bash
run: |
mkdir $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin
mkdir $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/Windows
mkdir $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/macOS
mv $GITHUB_WORKSPACE/clockify-windows-2022/* $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/Windows/
mv $GITHUB_WORKSPACE/clockify-macos-12/* $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/macOS/
mv $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/Windows/Images/ $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/
mv $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/Windows/PropertyInspector/ $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/
mv $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/Windows/manifest.json $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/
rm -r $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/macOS/Images
rm -r $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/macOS/PropertyInspector
rm $GITHUB_WORKSPACE/dev.duerrenberger.clockify.sdPlugin/macOS/manifest.json
mkdir $GITHUB_WORKSPACE/publish
- name: Build StreamDeck App
uses: SantiMA10/[email protected]
with:
input-directory: "/dev.duerrenberger.clockify.sdPlugin"
output-directory: "/publish"
- name: Upload StreamDeck App
uses: actions/upload-artifact@v3
with:
name: dev.duerrenberger.clockify.streamDeckPlugin
path: publish/dev.duerrenberger.clockify.streamDeckPlugin