Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

ci: separate package and release workflows

Lars Berger42977b0063e5
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index dbee4f00..59792d18 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -13,11 +13,9 @@ jobs:
include:
# 64-bit Windows (Intel & AMD)
- rust-target: x86_64-pc-windows-msvc
- wix-target: x64
# 64-bit Windows (ARM)
- rust-target: aarch64-pc-windows-msvc
- wix-target: arm64
runs-on: windows-latest
steps:
@@ -32,29 +30,20 @@ jobs:
with:
shared-key: ${{ matrix.rust-target }}-${{ hashFiles('Cargo.lock') }}
- - name: Build with windows subsystem
+ - name: Build (windows subsystem)
run: |
cargo build --locked --release --target ${{ matrix.rust-target }} --features no_console
- mv target/${{ matrix.rust-target }}/release/wm.exe tmp/wm-noconsole.exe
- mv target/${{ matrix.rust-target }}/release/watcher.exe tmp/watcher-noconsole.exe
+ mkdir tmp/noconsole
+ mv target/${{ matrix.rust-target }}/release/{wm,watcher}.exe tmp/noconsole
- - name: Build with console subsystem
+ - name: Build (console subsystem)
run: |
cargo build --locked --release --target ${{ matrix.rust-target }}
- mv target/${{ matrix.rust-target }}/release/wm.exe tmp/wm-console.exe
- mv target/${{ matrix.rust-target }}/release/watcher.exe tmp/watcher-console.exe
-
- - name: Install WiX
- run: dotnet tool install --global wix --version 5.0.0
-
- - name: Create MSI installer
- run: |
- wix extension add WixToolset.UI.wixext/5 WixToolset.Util.wixext/5 WixToolset.BootstrapperApplications.wixext/5
- wix build -arch ${{ matrix.wix-target }} -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext \
- -out "./tmp/installer.exe" "./resources/main.wxs"
+ mkdir tmp/console
+ mv target/${{ matrix.rust-target }}/release/{wm,watcher}.exe tmp/console
- uses: actions/upload-artifact@v4
with:
- name: installer-${{ matrix.rust-target }}
+ name: executables-${{ matrix.rust-target }}
if-no-files-found: error
- path: tmp/installer.exe
+ path: tmp/**
diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml
new file mode 100644
index 00000000..3958aff0
--- /dev/null
+++ b/.github/workflows/package.yaml
@@ -0,0 +1,45 @@
+name: Package
+
+on:
+ workflow_call:
+
+jobs:
+ build:
+ uses: ./.github/workflows/build.yaml
+
+ package:
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Download executables
+ uses: actions/download-artifact@v4
+ with:
+ name: executables-*
+ path: tmp/
+
+ - name: Install WiX and its extensions
+ run: |
+ dotnet tool install --global wix --version 5.0.0
+ wix extension add WixToolset.UI.wixext/5 WixToolset.Util.wixext/5 WixToolset.BootstrapperApplications.wixext/5
+
+ - name: Create MSI installer (x64)
+ run: |
+ wix build -arch "x64" -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext \
+ -out "./tmp/installer-x64.msi" "./resources/standalone.wxs"
+
+ - name: Create MSI installer (arm64)
+ run: |
+ wix build -arch "arm64" -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext \
+ -out "./tmp/installer-arm64.msi" "./resources/standalone.wxs"
+
+ - name: Create universal installer
+ run: |
+ wix build -arch "x64" -ext WixToolset.BootstrapperApplications.wixext \
+ -out "./tmp/installer-universal.exe" "./resources/bundle.wxs"
+
+ - uses: actions/upload-artifact@v4
+ with:
+ name: installers
+ if-no-files-found: error
+ path: tmp/installer-*
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index f168435c..e18c7aa8 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -28,17 +28,11 @@ jobs:
with:
fetch-depth: 0
- - name: Download artifacts (x64)
+ - name: Download installers
uses: actions/download-artifact@v4
with:
- name: installer-x86_64-pc-windows-msvc
- path: tmp/installer-x64
-
- - name: Download artifacts (arm64)
- uses: actions/download-artifact@v4
- with:
- name: installer-aarch64-pc-windows-msvc
- path: tmp/installer-arm64
+ name: installers
+ path: tmp/
- uses: glzr-io/actions/semantic-release@main
with:
@@ -47,12 +41,19 @@ jobs:
gh-token: ${{ github.token }}
gh-assets: |
[
+ {
+ "path": "tmp/installer-universal",
+ "name": "glazewm-${nextRelease.gitTag}",
+ "label": "${nextRelease.gitTag} Installer (recommended)"
+ },
{
"path": "tmp/installer-x64",
- "name": "glazewm_x64_${nextRelease.gitTag}"
+ "name": "glazewm-x64-${nextRelease.gitTag}",
+ "label": "${nextRelease.gitTag} Installer (standalone x64)"
},
{
"path": "tmp/installer-arm64",
- "name": "glazewm_arm64_${nextRelease.gitTag}"
+ "name": "glazewm-arm64-${nextRelease.gitTag}",
+ "label": "${nextRelease.gitTag} Installer (standalone arm64)"
}
]