Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/actions/create-release-artifacts/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Create release artifacts

description: Creates release-ready binaries and uploads them as artifacts.
description: Creates release-ready binaries.

inputs:
version:
Expand All @@ -18,18 +18,10 @@ runs:
- name: Create binaries
shell: bash
run: |
dotnet tool install --global wix --version 4.0.6
dotnet tool update --global wix --version 4.0.6
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
shell: pwsh
run: Compress-Archive -Path "publish/${{ inputs.arch }}/DesktopClock.exe" -DestinationPath "publish/DesktopClock-${{ inputs.version }}-${{ inputs.arch }}.zip" -Force

- uses: actions/upload-artifact@v7
with:
name: desktopclock-${{ inputs.arch }}
if-no-files-found: error
path: |
publish/*.zip
publish/*.msi
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,11 @@ jobs:
- uses: ./.github/actions/create-release-artifacts
with:
arch: ${{ matrix.arch }}

- uses: actions/upload-artifact@v7
with:
name: desktopclock-${{ matrix.arch }}
if-no-files-found: error
path: |
publish/*.zip
publish/*.msi
40 changes: 11 additions & 29 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,53 +19,35 @@ on:
default: true

permissions:
contents: read
contents: write

jobs:
build-test:
name: Build and test
release:
name: Release
runs-on: windows-2025
steps:
- uses: actions/checkout@v6

- uses: ./.github/actions/build-and-test

package:
name: Package ${{ matrix.arch }}
runs-on: windows-2025
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
steps:
- uses: actions/checkout@v6

- uses: ./.github/actions/create-release-artifacts
- name: Package x64
uses: ./.github/actions/create-release-artifacts
with:
version: ${{ inputs.version }}
arch: ${{ matrix.arch }}
arch: x64

deploy:
name: Create GitHub release
needs:
- build-test
- package
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/download-artifact@v8
- name: Package arm64
uses: ./.github/actions/create-release-artifacts
with:
pattern: desktopclock-*
path: release-artifacts
merge-multiple: true
version: ${{ inputs.version }}
arch: arm64

- name: Create GitHub release
if: ${{ !inputs.dryRun }}
uses: ncipollo/release-action@v1.21.0
with:
tag: "v${{ inputs.version }}"
artifacts: "release-artifacts/*.zip,release-artifacts/*.msi"
artifacts: "publish/*.zip,publish/*.msi"
generateReleaseNotes: true
prerelease: ${{ contains(inputs.version, '-') }}
allowUpdates: ${{ inputs.updateRelease }}
Expand Down
Loading