-
Notifications
You must be signed in to change notification settings - Fork 9
67 lines (52 loc) · 1.89 KB
/
main.yml
File metadata and controls
67 lines (52 loc) · 1.89 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
65
66
67
# This workflow will build and publish a WinUI 3 unpackaged desktop application
# built on .NET.
name: WinUI 3 unpackaged app
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
configuration: [Release]
platform: [x64]
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:
Solution_Name: Edge.sln # Replace with your solution name, i.e. App1.sln.
steps:
# Get current time
- name: Get current time
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"``
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2.0.0
# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Edge /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
# Create the app by building and publishing the project
- name: Create the app
run: msbuild $env:Edge /t:Publish /p:Configuration=$env:Configuration /p:Platform=$env:Platform
env:
Configuration: ${{ matrix.configuration }}
Platform: ${{ matrix.platform }}
# Upload the app
- name: Upload app
uses: actions/upload-artifact@v4.6.1
with:
name: Edge-${{ steps.date.outputs.date }}
path: ${{ github.workspace }}\\bin\\win-${{ matrix.platform }}\\publish