This repository has been archived by the owner on Dec 14, 2024. It is now read-only.
feat: Github Actions CI/CD #20
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: Build PSP Papers Mod Installer | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
configuration: [Debug, Release] | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: CD into the installer | |
run: cd psp-papers-installer/ | |
- name: Create SDK JSON settings | |
run: "echo '{\"sdk\":{\"version\": \"6.x\"}}' > ./global.json" | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '6.x' | |
- name: Install .NET Framework 4.8 | |
run: | | |
choco install netfx-4.8-devpack | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v1.1 | |
- name: Download dependencies | |
run: dotnet restore "psp-papers-installer.csproj" | |
env: | |
Configuration: ${{ matrix.configuration }} | |
- name: Create installer executable | |
run: dotnet msbuild "psp-papers-installer.csproj" /p:Configuration=$env:Configuration | |
env: | |
Configuration: ${{ matrix.configuration }} | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PspPapersModInstaller | |
path: psp-papers-installer\bin\Release |