Skip to content

Fix nullable dereference warning on MaxBy result #7

Fix nullable dereference warning on MaxBy result

Fix nullable dereference warning on MaxBy result #7

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- os: macos-latest
rid: osx-arm64
artifact: ShieldCommander-macos-arm64.dmg
- os: macos-latest
rid: osx-x64
artifact: ShieldCommander-macos-x64.dmg
- os: windows-latest
rid: win-x64
artifact: ShieldCommander-windows-x64.zip
- os: ubuntu-latest
rid: linux-x64
artifact: ShieldCommander-linux-x64.tar.gz
- os: ubuntu-latest
rid: linux-arm64
artifact: ShieldCommander-linux-arm64.tar.gz
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
- name: Set version from tag
id: version
shell: bash
run: echo "value=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Install create-dmg
if: startsWith(matrix.rid, 'osx')
run: brew install create-dmg
- name: Publish and package macOS
if: startsWith(matrix.rid, 'osx')
run: ./scripts/publish-macos.sh ${{ matrix.rid }} ${{ steps.version.outputs.value }} --dmg ${{ matrix.artifact }}
- name: Publish
if: ${{ !startsWith(matrix.rid, 'osx') }}
run: >
dotnet publish src/ShieldCommander.UI/ShieldCommander.UI.csproj
-c Release
-r ${{ matrix.rid }}
--self-contained true
-o publish/bin
-p:Version=${{ steps.version.outputs.value }}
- name: Package Windows
if: matrix.rid == 'win-x64'
shell: pwsh
run: Compress-Archive -Path publish/bin/* -DestinationPath ${{ matrix.artifact }}
- name: Package Linux
if: startsWith(matrix.rid, 'linux')
run: tar -czf ${{ matrix.artifact }} -C publish/bin .
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
merge-multiple: true
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
prerelease: ${{ contains(github.ref_name, '-') }}
files: artifacts/*
append_body: true
body: |
## macOS
The app is not signed with an Apple Developer certificate. After mounting the DMG and dragging the app to Applications, run:
```
xattr -cr "/Applications/Shield Commander.app"
```
Then open the app normally. You only need to do this once.