forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.26 KB
/
copilot-setup-steps.yml
File metadata and controls
50 lines (42 loc) · 1.26 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
name: "Copilot Setup Steps"
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Run a pre-work build
shell: pwsh
continue-on-error: true
run: .\build.ps1
- name: Add the local .NET to the envvars (PATH, DOTNET_ROOT)
shell: bash
run: |
echo "$GITHUB_WORKSPACE/.dotnet" >> "$GITHUB_PATH"
echo "DOTNET_ROOT=$GITHUB_WORKSPACE/.dotnet" >> "$GITHUB_ENV"
echo "DOTNET_INSTALL_DIR=$GITHUB_WORKSPACE/.dotnet" >> "$GITHUB_ENV"
echo "DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT=true" >> "$GITHUB_ENV"
- name: Ensure we are using the correct .NET
shell: pwsh
run: |
dotnet --version
dotnet --info
dotnet workload --info
- name: Reset tracked files to clean workspace
shell: bash
run: |
git reset --hard HEAD