feature: add a basic update checker using github releases #60
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: CI Build | |
on: | |
push: | |
branches: | |
- main | |
- 'release/**' | |
- 'feature/**' | |
- 'backport/**' | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.gitignore' | |
- '**/*.gitattributes' | |
pull_request: | |
branches: [ main ] | |
release: | |
types: | |
- released | |
workflow_dispatch: | |
permissions: | |
contents: read | |
env: | |
DOTNET_NOLOGO: true # Disable the .NET logo | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience | |
DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry | |
jobs: | |
# MAUI Windows Build | |
build-windows: | |
runs-on: windows-2022 | |
name: Windows Build | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Assign version in code | |
uses: thiagodnf/[email protected] | |
with: | |
find: "<version_text>" | |
replace: "${{ github.ref_name }}" | |
include: | | |
src/**/CurrentVersion.cs | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: Install MAUI Workload | |
run: dotnet workload install maui --ignore-failed-sources | |
- name: Build MAUI Windows | |
run: dotnet publish src/PristonToolsEU.csproj -f net8.0-windows10.0.19041.0 -c Release -p:WindowsPackageType=None -p:RuntimeIdentifierOverride=win10-x64 | |
- name: Create zip | |
uses: thedoctor0/[email protected] | |
with: | |
type: 'zip' | |
filename: 'Windows-x64.zip' | |
path: src/bin/Release/net8.0-windows10.0.19041.0/win10-x64/publish | |
- name: Upload Release Assets | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: Windows-x64.zip | |
- name: Upload Windows Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mauibeach-windows-ci-build | |
path: Windows-x64.zip | |
# MAUI MacCatalyst Build | |
build-mac: | |
permissions: | |
contents: write | |
runs-on: macos-12 | |
name: MacCatalyst Build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Assign version in code | |
uses: thiagodnf/[email protected] | |
with: | |
find: "<version_text>" | |
replace: "${{ github.ref_name }}" | |
include: | | |
src/**/CurrentVersion.cs | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: Install MAUI Workload | |
run: dotnet workload install maui --ignore-failed-sources | |
- name: Build MAUI MacCatalyst | |
run: dotnet publish src/PristonToolsEU.csproj -f net8.0-maccatalyst -c Release -p:CreatePackage=false | |
- name: Create zip | |
run: ditto -c -k --sequesterRsrc --keepParent src/bin/Release/net8.0-maccatalyst/PristonToolsEU.app macOS-universal.zip | |
- name: Upload Release Assets | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: macOS-universal.zip | |
- name: Upload MacCatalyst Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-ci-build | |
path: macOS-universal.zip |