|
1 | | -# This workflow uses actions that are not certified by GitHub. |
2 | | -# They are provided by a third-party and are governed by |
3 | | -# separate terms of service, privacy policy, and support |
4 | | -# documentation. |
5 | | - |
6 | | -# This workflow will build, test, sign and package a WPF or Windows Forms desktop application |
7 | | -# built on .NET Core. |
8 | | -# To learn how to migrate your existing application to .NET Core, |
9 | | -# refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework |
10 | | -# |
11 | | -# To configure this workflow: |
12 | | -# |
13 | | -# 1. Configure environment variables |
14 | | -# GitHub sets default environment variables for every workflow run. |
15 | | -# Replace the variables relative to your project in the "env" section below. |
16 | | -# |
17 | | -# 2. Signing |
18 | | -# Generate a signing certificate in the Windows Application |
19 | | -# Packaging Project or add an existing signing certificate to the project. |
20 | | -# Next, use PowerShell to encode the .pfx file using Base64 encoding |
21 | | -# by running the following Powershell script to generate the output string: |
22 | | -# |
23 | | -# $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte |
24 | | -# [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt' |
25 | | -# |
26 | | -# Open the output file, SigningCertificate_Encoded.txt, and copy the |
27 | | -# string inside. Then, add the string to the repo as a GitHub secret |
28 | | -# and name it "Base64_Encoded_Pfx." |
29 | | -# For more information on how to configure your signing certificate for |
30 | | -# this workflow, refer to https://github.com/microsoft/github-actions-for-desktop-apps#signing |
31 | | -# |
32 | | -# Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key". |
33 | | -# See "Build the Windows Application Packaging project" below to see how the secret is used. |
34 | | -# |
35 | | -# For more information on GitHub Actions, refer to https://github.com/features/actions |
36 | | -# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications, |
37 | | -# refer to https://github.com/microsoft/github-actions-for-desktop-apps |
38 | | - |
39 | 1 | name: Avalonia WinForms Package |
40 | 2 |
|
41 | 3 | on: |
|
44 | 6 | pull_request: |
45 | 7 | branches: [ main ] |
46 | 8 |
|
| 9 | +permissions: |
| 10 | + # only allowed to read source code (ref. https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs) |
| 11 | + contents: read |
| 12 | + |
47 | 13 | jobs: |
48 | 14 |
|
49 | 15 | build: |
|
52 | 18 | matrix: |
53 | 19 | configuration: [Release] |
54 | 20 |
|
55 | | - runs-on: windows-latest # For a list of available runner types, refer to |
56 | | - # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on |
| 21 | + runs-on: windows-latest |
57 | 22 |
|
58 | 23 | env: |
59 | | - Solution_Name: RoyalApps.Community.Avalonia.Windows.slnx # Replace with your solution name, i.e. MyWpfApp.sln. |
60 | | - # Test_Project_Path: your-test-project-path # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. |
61 | | - # Wap_Project_Directory: your-wap-project-directory-name # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package. |
62 | | - # Wap_Project_Path: your-wap-project-path # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj. |
63 | 24 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true |
64 | 25 | DOTNET_CLI_TELEMETRY_OPTOUT: true |
65 | 26 | DOTNET_NOLOGO: true |
|
69 | 30 | uses: actions/checkout@v6 |
70 | 31 | with: |
71 | 32 | fetch-depth: 0 |
| 33 | + persist-credentials: false |
72 | 34 |
|
73 | 35 | # Install the .NET Core workload |
74 | 36 | - name: Install .NET Core |
|
90 | 52 |
|
91 | 53 | # Upload packages |
92 | 54 | - name: Upload managed components |
93 | | - uses: actions/upload-artifact@v6 |
| 55 | + uses: actions/upload-artifact@v7 |
94 | 56 | with: |
95 | 57 | name: Avalonia-nupkg |
96 | 58 | path: ./*.nupkg |
|
0 commit comments