From e0901c22e928b603cb085743915987aea933bfa9 Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Wed, 3 Jun 2026 17:11:34 -0500 Subject: [PATCH 1/2] Polish GitHub workflows --- .github/actions/build-and-test/action.yml | 2 +- .../actions/create-release-artifacts/action.yml | 13 +++++-------- .github/workflows/build.yml | 6 +++--- .github/workflows/deploy.yml | 17 +++++++++-------- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/actions/build-and-test/action.yml b/.github/actions/build-and-test/action.yml index e0bdd9b..8a2002f 100644 --- a/.github/actions/build-and-test/action.yml +++ b/.github/actions/build-and-test/action.yml @@ -17,4 +17,4 @@ runs: - name: Test shell: bash - run: dotnet test -c Release --no-build --logger trx --results-directory TestResults + run: dotnet test -c Release --no-build --no-restore --logger trx --results-directory TestResults diff --git a/.github/actions/create-release-artifacts/action.yml b/.github/actions/create-release-artifacts/action.yml index e990d75..bf365c0 100644 --- a/.github/actions/create-release-artifacts/action.yml +++ b/.github/actions/create-release-artifacts/action.yml @@ -15,19 +15,16 @@ runs: steps: - uses: actions/setup-dotnet@v5 - - name: Create Binaries + - name: Create binaries shell: bash run: | - arch="${{ inputs.arch }}" dotnet tool install --global wix --version 4.0.6 - dotnet publish ./DesktopClock/DesktopClock.csproj -o "publish/$arch" -c Release --os win --arch "$arch" -p:Version=${{ inputs.version }} - wix build Product.wxs -d MainExeSource="publish/$arch/DesktopClock.exe" -o "publish/DesktopClock-${{ inputs.version }}-$arch.msi" + dotnet publish ./DesktopClock/DesktopClock.csproj -o "publish/${{ inputs.arch }}" -c Release --os win --arch "${{ inputs.arch }}" -p:Version="${{ inputs.version }}" + wix build Product.wxs -d "MainExeSource=publish/${{ inputs.arch }}/DesktopClock.exe" -o "publish/DesktopClock-${{ inputs.version }}-${{ inputs.arch }}.msi" - - name: Create Portable ZIP + - name: Create portable ZIP shell: pwsh - run: | - $arch = "${{ inputs.arch }}" - Compress-Archive -Path "publish/$arch/DesktopClock.exe" -DestinationPath "publish/DesktopClock-${{ inputs.version }}-$arch.zip" + run: Compress-Archive -Path "publish/${{ inputs.arch }}/DesktopClock.exe" -DestinationPath "publish/DesktopClock-${{ inputs.version }}-${{ inputs.arch }}.zip" -Force - uses: actions/upload-artifact@v7 with: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73b4289..e26976e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: name: Format runs-on: windows-2025 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/setup-dotnet@v5 @@ -29,7 +29,7 @@ jobs: name: Build and test runs-on: windows-2025 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: ./.github/actions/build-and-test @@ -49,7 +49,7 @@ jobs: matrix: arch: [x64, arm64] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: ./.github/actions/create-release-artifacts with: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bdcfd0d..83e0305 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,26 +19,27 @@ on: default: true permissions: - contents: write + contents: read jobs: build-test: name: Build and test runs-on: windows-2025 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: ./.github/actions/build-and-test package: name: Package ${{ matrix.arch }} + needs: build-test runs-on: windows-2025 strategy: fail-fast: false matrix: arch: [x64, arm64] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: ./.github/actions/create-release-artifacts with: @@ -47,10 +48,10 @@ jobs: deploy: name: Create GitHub release - needs: - - build-test - - package - runs-on: windows-2025 + needs: package + runs-on: ubuntu-24.04 + permissions: + contents: write steps: - uses: actions/download-artifact@v8 with: @@ -65,7 +66,7 @@ jobs: tag: "v${{ inputs.version }}" artifacts: "release-artifacts/*.zip,release-artifacts/*.msi" generateReleaseNotes: true - prerelease: ${{ contains(inputs.version, 'preview') }} + prerelease: ${{ contains(inputs.version, '-') }} allowUpdates: ${{ inputs.updateRelease }} removeArtifacts: true omitBodyDuringUpdate: true From a29c865e0ab83a9ec9f809a836fb498ca33f55aa Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Wed, 3 Jun 2026 17:16:51 -0500 Subject: [PATCH 2/2] Fix release workflow dependencies --- .github/workflows/deploy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 83e0305..919f486 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,7 +32,6 @@ jobs: package: name: Package ${{ matrix.arch }} - needs: build-test runs-on: windows-2025 strategy: fail-fast: false @@ -48,7 +47,9 @@ jobs: deploy: name: Create GitHub release - needs: package + needs: + - build-test + - package runs-on: ubuntu-24.04 permissions: contents: write