-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathcodenamek-wpf-desktop-release.yml
More file actions
64 lines (56 loc) · 2.1 KB
/
codenamek-wpf-desktop-release.yml
File metadata and controls
64 lines (56 loc) · 2.1 KB
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
name: Build CodeNameK WPF for Release
on:
workflow_dispatch:
inputs:
PackageVersion:
description: "Package version for the artifacts. 1.0.0-beta1 for example."
required: true
default: "1.0.0-beta1"
jobs:
build:
runs-on:
windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
env:
Configuration: Release
TargetProject: CodeNameK/src/CodeNameK.WPF/CodeNameK.WPF.csproj
ArtifactsFolder: CodeNameK/artifacts
RID: win10-x64
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# Install the .NET Core SDK
- name: Install .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.x
# Restore the target project
- name: Restore the project
run: dotnet restore -r $env:RID $env:TargetProject
env:
TargetProject: ${{ env.TargetProject }}
RID: ${{ env.RID }}
# Build the target project
- name: Build the project
run: dotnet build -c $env:Configuration -r $env:RID --no-restore --sc $env:TargetProject
env:
Configuration: ${{ env.Configuration }}
TargetProject: ${{ env.TargetProject }}
RID: ${{ env.RID }}
# Publish the target project
- name: Publish the project
run: dotnet publish -c $env:Configuration -r $env:RID --no-build --self-contained $env:TargetProject -o "$env:ArtifactsFolder/publish/$env:RID/"
env:
Configuration: ${{ env.Configuration }}
TargetProject: ${{ env.TargetProject }}
RID: ${{ env.RID }}
ArtifactsFolder: ${{ env.ArtifactsFolder }}
# Upload the artifacts: https://github.com/marketplace/actions/upload-a-build-artifact
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: NumberIt.${{ github.event.inputs.PackageVersion }}.${{ env.RID }}
path: ${{ env.ArtifactsFolder }}
retention-days: 1