Skip to content

.NET Core Desktop

.NET Core Desktop #3

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build, test, sign and package a WPF or Windows Forms desktop application
# built on .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
#
# To configure this workflow:
#
# 1. Configure environment variables
# GitHub sets default environment variables for every workflow run.
# Replace the variables relative to your project in the "env" section below.
#
# For more information on GitHub Actions, refer to https://github.com/features/actions
# 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
name: .NET Core Desktop
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
Solution_Name: SimPe.sln # Replace with your solution name, i.e. MyWpfApp.sln.
steps:
- 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: |
8.0.x
9.0.x
# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: dotnet restore
- name: Add NuGet package source
run: dotnet nuget add source --username autinerd --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/sims-hacker-zone/index.json"
# Create the app package by building and packaging the Windows Application Packaging project
- name: Create the NuGet package
run: dotnet pack
- name: Publish the NuGet package
run: dotnet nuget push "./SimPe/bin/Release/*.nupkg" -s github