Remove AOT; not supported by WPF #40
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET Core | |
# Trigger on any push with a git tag | |
# To create a git tag, run the following commands on the branch you wish to release: | |
# git tag 1.0.0.0 | |
# git push origin --tags | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
runs-on: windows-latest | |
env: | |
Portable_Archive: PixelPalette_Portable.zip | |
Project_Directory: PixelPalette | |
Installer_Directory: PixelPalette.Installer | |
Installer_Filename: PixelPalette.Installer.msi | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Add dotnet to PATH | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
# The installer utilizes WiX 3.x, which is not compatible with the dotnet CLI. | |
# It uses the older NuGet packages.config file and is built directly with MSBuild. | |
# Therefore, we need both MSBuild and NuGet. | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v1 | |
- name: Add nuget to PATH | |
uses: nuget/setup-nuget@v1 | |
with: | |
nuget-version: '5.x' | |
# Fetch deps | |
- name: Restore deps | |
run: dotnet restore | |
# Builds the main App & Test projects. | |
- name: Build | |
run: dotnet build --no-restore --configuration Release | |
- name: Test | |
run: dotnet test --configuration Release | |
- name: Publish | |
run: dotnet publish --configuration Release $env:Project_Directory\$env:Project_Filename | |
# The installer must be built separately because it is not supported by the dotnet CLI. | |
- name: Get installer deps | |
run: nuget restore $env:Installer_Directory -PackagesDirectory packages | |
- name: Build installer | |
run: MSBuild $env:Installer_Directory -p:Configuration=Release | |
# Archive the App build | |
- name: Create App archive | |
run: Compress-Archive -Path $env:Project_Directory\bin\Release\win-x64\publish\* -DestinationPath $env:Project_Directory\bin\$env:Portable_Archive | |
# Get the name of the tag that was pushed | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
shell: bash | |
# Create the release: https://github.com/actions/create-release | |
- name: Create release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions; you do not need to create your own token | |
with: | |
tag_name: build-release.${{ github.ref }} | |
name: ${{ steps.get_version.outputs.VERSION }} | |
draft: false | |
prerelease: false | |
files: | | |
${{ env.Installer_Directory }}/bin/Release/en-us/${{ env.Installer_Filename }} | |
${{ env.Project_Directory }}/bin/${{ env.Portable_Archive }} |