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..919f486 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,14 +19,14 @@ 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 @@ -38,7 +38,7 @@ jobs: matrix: arch: [x64, arm64] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: ./.github/actions/create-release-artifacts with: @@ -50,7 +50,9 @@ jobs: needs: - build-test - package - runs-on: windows-2025 + runs-on: ubuntu-24.04 + permissions: + contents: write steps: - uses: actions/download-artifact@v8 with: @@ -65,7 +67,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