sudo make me a sandwich #24
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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Get flatpak-builder | |
run: DEBIAN_FRONTEND=noninteractive sudo apt -y install flatpak-builder flatpak | |
- name: Get Flatpak freedesktop SDK | |
run: sudo flatpak install flathub org.freedesktop.Platform//22.08 org.freedesktop.Sdk//22.08 | |
- name: Get PupNet | |
run: dotnet tool install -g KuiperZone.PupNet | |
- name: Build RPM | |
run: pupnet -y -k rpm -o CrankItUp.rpm | |
- name: Build deb | |
run: pupnet -y -k deb -o CrankItUp.deb | |
- name: Build Appimage | |
run: pupnet -y -k appimage -o CrankItUp.appimage | |
- name: Build flatpak | |
run: pupnet -y -k flatpak -o CrankItUp.flatpak | |
- name: Build zip | |
run: pupnet -y -k zip -o CrankItUp.zip | |
- name: Upload RPM | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: CrankItUp.rpm | |
path: CrankItUp.Desktop/Deploy/bin/CrankItUp.rpm | |
- name: Upload deb | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: CrankItUp.deb | |
path: CrankItUp.Desktop/Deploy/bin/CrankItUp.deb | |
- name: Upload appimage | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: CrankItUp.appimage | |
path: CrankItUp.Desktop/Deploy/bin/CrankItUp.appimage | |
- name: Upload flatpak | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: CrankItUp.flatpak | |
path: CrankItUp.Desktop/Deploy/bin/CrankItUp.flatpak | |
- name: Upload zip | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: CrankItUp.zip | |
path: CrankItUp.Desktop/Deploy/bin/CrankItUp.zip | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --use-current-runtime CrankItUp.Desktop | |
- name: Test | |
run: dotnet test --no-build --verbosity normal CrankItUp.Desktop | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: CrankItUp-Windows | |
path: CrankItUp.Desktop/bin/Debug/net6.0/* |