Bump the nuget-dependencies group with 4 updates #244
This file contains hidden or 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
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| types: [ opened, reopened, synchronize ] | |
| workflow_call: | |
| inputs: | |
| platforms: | |
| description: 'Platforms to build for' | |
| required: false | |
| type: string | |
| latest: | |
| description: 'Tag image as latest' | |
| required: false | |
| type: boolean | |
| default: false | |
| rc: | |
| description: 'Tag image as rc' | |
| required: false | |
| type: boolean | |
| default: false | |
| workflow_dispatch: | |
| name: ci-build | |
| permissions: | |
| contents: read | |
| actions: write | |
| packages: write | |
| env: | |
| DOTNET_VERSION: 10.0.x | |
| REGISTRY: ghcr.io | |
| jobs: | |
| test-module-loader: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest ] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup .NET SDK ${{ env.DOTNET_VERSION }} | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ matrix.os }}-tests-nuget-${{ hashFiles('**/*.csproj', 'Directory.Packages.props') }} | |
| restore-keys: | | |
| ${{ matrix.os }}-tests-nuget- | |
| - name: Run module loader tests | |
| # TUnit ships its own runner via Microsoft.Testing.Platform; the test project is | |
| # an Exe. `dotnet run` invokes that runner directly and works on net10 without the | |
| # legacy VSTest bridge. | |
| run: dotnet run --project Desktop.ModuleManager.Tests/Desktop.ModuleManager.Tests.csproj -c Release -- --report-trx --report-trx-filename test-results.trx --results-directory ${{ github.workspace }}/test-results | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: module-loader-test-results-${{ matrix.os }} | |
| path: ${{ github.workspace }}/test-results | |
| if-no-files-found: ignore | |
| build-windows-maui: | |
| runs-on: windows-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup .NET SDK ${{ env.DOTNET_VERSION }} | |
| uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Install maui workload for windows | |
| run: dotnet workload install maui-windows | |
| - name: Cache NuGet packages | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: ~/.nuget/packages | |
| key: windows-maui-nuget | |
| restore-keys: | | |
| windows-maui-nuget | |
| - name: Publish OpenShock Desktop Windows | |
| run: dotnet publish Desktop/Desktop.csproj -c Release-Windows -o ./publish/Windows-Maui | |
| - name: Upload OpenShock Desktop Windows artifacts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: OpenShock Desktop Windows MAUI | |
| path: publish/Windows-Maui/* | |
| retention-days: 1 | |
| if-no-files-found: error | |
| installer-windows-maui: | |
| runs-on: windows-latest | |
| needs: build-windows-maui | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| sparse-checkout: | | |
| Installer | |
| - name: Download artifacts | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: OpenShock Desktop Windows MAUI | |
| path: publish/ | |
| - name: Install NSIS | |
| run: choco install nsis -y | |
| - name: Create nsis installer | |
| uses: joncloud/makensis-action@971ef20f43e4f9f3af2c7f276cb7348d033da1cd # v5.0 | |
| with: | |
| script-file: ${{ github.workspace }}/Installer/installer.nsi | |
| additional-plugin-paths: ${{ github.workspace }}/Installer/Plugins | |
| - name: Upload OpenShock Desktop Windows Setup | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: OpenShock_Desktop_Setup | |
| path: Installer/OpenShock_Desktop_Setup.exe | |
| retention-days: 7 | |
| if-no-files-found: error | |
| build-linux-web-containers: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 | |
| - name: Log in to Container Registry | |
| uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/desktop | |
| flavor: | | |
| latest=false | |
| tags: | | |
| type=raw,value={{branch}},enable=${{ github.ref_type == 'branch' && github.event_name != 'pull_request' }} | |
| type=raw,value=latest,enable=${{ github.event_name == 'workflow_call' && (inputs.latest || false) }} | |
| type=raw,value=rc,enable=${{ github.event_name == 'workflow_call' && (inputs.rc || false) }} | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}}.{{minor}}.{{patch}} | |
| - name: Build and push | |
| uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: ${{ (inputs.latest || inputs.rc) || (github.ref_protected && github.event_name != 'pull_request') }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: ${{ inputs.platforms || 'linux/amd64' }} | |
| cache-from: | | |
| type=gha | |
| cache-to: | | |
| type=gha | |
| build-linux-photino: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup .NET SDK ${{ env.DOTNET_VERSION }} | |
| uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Cache NuGet packages | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: ~/.nuget/packages | |
| key: linux-photino-nuget | |
| restore-keys: | | |
| linux-photino-nuget | |
| - name: Publish OpenShock Photino | |
| run: dotnet publish Desktop/Desktop.csproj -c Release-Photino -o ./publish/Photino-Linux | |
| - name: Upload OpenShock Desktop Photino Linux artifacts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: OpenShock Desktop Photino Linux | |
| path: publish/Photino-Linux/* | |
| retention-days: 7 | |
| if-no-files-found: error | |
| - name: Build AppImage | |
| run: | | |
| set -euo pipefail | |
| ARCH=x86_64 | |
| APPDIR=AppDir | |
| # Download appimagetool, pinned to a tagged release and verified by checksum | |
| # (runs without FUSE via --appimage-extract-and-run). | |
| APPIMAGETOOL_VERSION=1.9.1 | |
| APPIMAGETOOL_SHA256=ed4ce84f0d9caff66f50bcca6ff6f35aae54ce8135408b3fa33abfc3cb384eb0 | |
| curl -fsSL -o appimagetool \ | |
| "https://github.com/AppImage/appimagetool/releases/download/${APPIMAGETOOL_VERSION}/appimagetool-${ARCH}.AppImage" | |
| echo "${APPIMAGETOOL_SHA256} appimagetool" | sha256sum -c - | |
| chmod +x appimagetool | |
| # Assemble the AppDir from committed assets + the published self-contained app | |
| rm -rf "${APPDIR}" | |
| mkdir -p "${APPDIR}/usr/bin" \ | |
| "${APPDIR}/usr/share/applications" \ | |
| "${APPDIR}/usr/share/icons/hicolor/512x512/apps" | |
| cp -r publish/Photino-Linux/. "${APPDIR}/usr/bin/" | |
| install -m 0755 packaging/appimage/AppRun "${APPDIR}/AppRun" | |
| install -m 0644 packaging/appimage/OpenShock.Desktop.desktop \ | |
| "${APPDIR}/usr/share/applications/OpenShock.Desktop.desktop" | |
| cp packaging/appimage/OpenShock.Desktop.desktop "${APPDIR}/OpenShock.Desktop.desktop" | |
| install -m 0644 Desktop/wwwroot/images/Icon512.png \ | |
| "${APPDIR}/usr/share/icons/hicolor/512x512/apps/openshock-desktop.png" | |
| cp Desktop/wwwroot/images/Icon512.png "${APPDIR}/openshock-desktop.png" | |
| # The published binary needs to be executable | |
| chmod +x "${APPDIR}/usr/bin/OpenShock.Desktop" | |
| ARCH="${ARCH}" ./appimagetool --appimage-extract-and-run \ | |
| "${APPDIR}" "OpenShock_Desktop-${ARCH}.AppImage" | |
| - name: Upload OpenShock Desktop AppImage | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: OpenShock Desktop AppImage | |
| path: OpenShock_Desktop-*.AppImage | |
| retention-days: 7 | |
| if-no-files-found: error |