Merge branch 'master' into cleanup-iks

This commit is contained in:
Andy McKay
2020-05-25 12:51:37 -07:00
committed by GitHub
5 changed files with 32 additions and 14 deletions
@@ -3,9 +3,9 @@
# separate terms of service, privacy policy, and support # separate terms of service, privacy policy, and support
# documentation. # documentation.
# This workflow will build, test and package a WPF desktop application # This workflow will build, test, sign and package a WPF or Windows Forms desktop application
# built on .NET Core. # built on .NET Core.
# To learn how to migrate your existing WPF application to .NET Core, # To learn how to migrate your existing application to .NET Core,
# refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework # refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework
# #
# To configure this workflow: # To configure this workflow:
@@ -36,7 +36,7 @@
# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications, # For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications,
# refer to https://github.com/microsoft/github-actions-for-desktop-apps # refer to https://github.com/microsoft/github-actions-for-desktop-apps
name: WPF .NET Core name: .NET Core Desktop
on: on:
push: push:
@@ -81,8 +81,8 @@ jobs:
- name: Execute unit tests - name: Execute unit tests
run: dotnet test run: dotnet test
# Restore the WPF application to populate the obj folder with RuntimeIdentifiers # Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the WPF application - name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env: env:
Configuration: ${{ matrix.configuration }} Configuration: ${{ matrix.configuration }}
@@ -0,0 +1,6 @@
{
"name": ".NET Core Desktop",
"description": "Build, test, sign and publish a desktop application built on .NET Core.",
"iconName": "dotnetcore",
"categories": ["C#", "Visual Basic", "WPF", ".NET"]
}
@@ -1,6 +0,0 @@
{
"name": "WPF .NET Core",
"description": "Build, test and publish a WPF application built on .NET Core.",
"iconName": "dotnetcore",
"categories": ["C#", "Visual Basic", "WPF", ".NET"]
}
+3
View File
@@ -6,6 +6,9 @@ on:
pull_request: pull_request:
branches: [ master ] branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs: jobs:
build: build:
+18 -3
View File
@@ -11,6 +11,16 @@ interface WorkflowDesc {
iconType?: "svg" | "octicon"; iconType?: "svg" | "octicon";
} }
interface WorkflowProperties {
name: string;
description: string;
iconName?: string;
categories: string[] | null;
}
interface WorkflowsCheckResult { interface WorkflowsCheckResult {
compatibleWorkflows: WorkflowDesc[]; compatibleWorkflows: WorkflowDesc[];
incompatibleWorkflows: WorkflowDesc[]; incompatibleWorkflows: WorkflowDesc[];
@@ -33,16 +43,21 @@ async function checkWorkflows(
for (const e of dir) { for (const e of dir) {
if (e.isFile()) { if (e.isFile()) {
const workflowFilePath = join(folder, e.name); const workflowFilePath = join(folder, e.name);
const enabled = await checkWorkflow(workflowFilePath, enabledActions);
const workflowId = basename(e.name, extname(e.name)); const workflowId = basename(e.name, extname(e.name));
const workflowProperties = require(join( const workflowProperties: WorkflowProperties = require(join(
folder, folder,
"properties", "properties",
`${workflowId}.properties.json` `${workflowId}.properties.json`
)); ));
const iconName: string | undefined = workflowProperties["iconName"]; const iconName: string | undefined = workflowProperties["iconName"];
const isBlankTemplate = workflowId === "blank";
const partnerWorkflow = workflowProperties.categories === null;
const enabled =
(isBlankTemplate || !partnerWorkflow) &&
(await checkWorkflow(workflowFilePath, enabledActions));
const workflowDesc: WorkflowDesc = { const workflowDesc: WorkflowDesc = {
folder, folder,
id: workflowId, id: workflowId,