Skip to content

Commit 8e79b2c

Browse files
committed
Merge branch 'master' into DataHandlingRework
2 parents e75601a + 0675b65 commit 8e79b2c

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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+
name: ScreenCapture.NET-Release
40+
41+
on:
42+
release:
43+
types: [published]
44+
45+
jobs:
46+
build:
47+
runs-on: windows-latest
48+
49+
steps:
50+
- uses: actions/checkout@v2
51+
with:
52+
fetch-depth: 0
53+
- name: Setup .NET
54+
uses: actions/setup-dotnet@v1
55+
with:
56+
dotnet-version: 7.0.x
57+
- name: Restore dependencies
58+
run: dotnet restore
59+
- name: Build
60+
run: dotnet build --no-restore --configuration Release
61+
- name: Test
62+
run: dotnet test --no-build --verbosity normal --configuration Release
63+
- name: Upload a Build Artifact NET6
64+
uses: actions/[email protected]
65+
with:
66+
name: ScreenCapture.NET-NET6
67+
path: bin/net6.0/ScreenCapture.NET.*.dll
68+
if-no-files-found: error
69+
- name: Upload a Build Artifact NET7
70+
uses: actions/[email protected]
71+
with:
72+
name: ScreenCapture.NET-NET7
73+
path: bin/net7.0/ScreenCapture.NET.*.dll
74+
if-no-files-found: error
75+
- name: Upload Nuget Build Artifact
76+
uses: actions/[email protected]
77+
with:
78+
name: ScreenCapture.NET-Nugets
79+
path: bin/*nupkg
80+
if-no-files-found: error
81+
- name: Nuget Push
82+
run: dotnet nuget push **\*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
83+
- name: Symbols Push
84+
run: dotnet nuget push **\*.snupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)