-
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (45 loc) · 1.71 KB
/
release.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
name: Build and package for release
on:
release:
types: [published]
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
environment:
description: 'Environment to deploy'
required: false
default: 'staging'
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore src\CanIUse\Community.PowerToys.Run.Plugin.CanIUse\Community.PowerToys.Run.Plugin.CanIUse.csproj
- name: Create temporary solution for building
run: dotnet new sln -n "BuildTemporary"
- name: Add project to temporary solution
run: dotnet sln "BuildTemporary.sln" add src\CanIUse\Community.PowerToys.Run.Plugin.CanIUse\Community.PowerToys.Run.Plugin.CanIUse.csproj
- name: Build project
run: dotnet build "BuildTemporary.sln" --configuration Release --output ./build_output/CanIUse
- name: Create ZIP of build output
shell: pwsh # Use PowerShell shell
run: |
# Exclude specific files and create the zip file
$exclude = @("PowerToys.Common.UI.dll", "PowerToys.ManagedCommon.dll", "PowerToys.Settings.UI.Lib.dll", "Wox.Infrastructure.dll", "Wox.Plugin.dll")
Get-ChildItem -Recurse ./build_output | Where-Object {
$exclude -notcontains $_.Extension
} | Compress-Archive -DestinationPath CanIUse.zip -Update
- name: Upload project artifacts
uses: actions/upload-artifact@v3
with:
name: Project
path: CanIUse.zip