[macOS] Update flasher binaries #513
Workflow file for this run
This file contains 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
name: CI | |
on: | |
push: | |
branches: | |
- master | |
release: | |
types: | |
- published | |
pull_request: | |
jobs: | |
build_win: | |
name: Build (Windows) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '6.x' | |
- uses: actions/checkout@v4 | |
- name: Build | |
working-directory: ./windows | |
run: | | |
dotnet publish -c Release -r win-x64 --self-contained true | |
- name: Create installer | |
working-directory: ./windows | |
run: | | |
iscc install_compiler.iss | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: qmk_toolbox.exe | |
path: windows/QMK Toolbox/bin/Release/win-x64/publish/qmk_toolbox.exe | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: qmk_toolbox_install.exe | |
path: windows/qmk_toolbox_install.exe | |
build_macos: | |
name: Build (macOS) | |
runs-on: macOS-latest | |
steps: | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- uses: actions/checkout@v4 | |
- name: Check binary permissions | |
working-directory: ./macos/QMK Toolbox/Resources | |
env: | |
QMK_BINARIES: avrdude bootloadHID dfu-programmer dfu-util mdloader teensy_loader_cli wb32-dfu-updater_cli | |
run: | | |
status=0 | |
for b in $QMK_BINARIES; do | |
perm=$(stat -f "%Lp" $b) | |
echo "$b: $perm" | |
[[ $perm == "755" ]] || status=1 | |
done | |
exit $status | |
- name: Build | |
working-directory: ./macos | |
run: | | |
mkdir build | |
xcodebuild CONFIGURATION_BUILD_DIR=build | |
ditto -ck --rsrc --sequesterRsrc -v --keepParent "build/QMK Toolbox.app" build/QMK.Toolbox.app.zip | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: QMK.Toolbox.app.zip | |
path: macos/build/QMK.Toolbox.app.zip | |
- name: Create installer | |
working-directory: ./macos | |
run: | | |
brew update | |
brew install packages | |
packagesbuild -v "QMK Toolbox.pkgproj" | |
mv "build/QMK Toolbox.pkg" build/QMK.Toolbox.pkg | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: QMK.Toolbox.pkg | |
path: macos/build/QMK.Toolbox.pkg | |
publish_release: | |
name: Publish (Release) | |
runs-on: ubuntu-latest | |
needs: [build_win, build_macos] | |
if: github.event.release.tag_name | |
steps: | |
- uses: actions/download-artifact@v4 | |
- uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
name: ${{ github.event.release.name }} | |
files: | | |
./qmk_toolbox.exe/qmk_toolbox.exe | |
./qmk_toolbox_install.exe/qmk_toolbox_install.exe | |
./QMK.Toolbox.app.zip/QMK.Toolbox.app.zip | |
./QMK.Toolbox.pkg/QMK.Toolbox.pkg | |
publish_beta: | |
name: Publish (Beta) | |
runs-on: ubuntu-latest | |
needs: [build_win, build_macos] | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
steps: | |
- uses: actions/download-artifact@v4 | |
- uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "beta" | |
prerelease: true | |
title: "Latest Beta" | |
files: | | |
./qmk_toolbox.exe/qmk_toolbox.exe | |
./qmk_toolbox_install.exe/qmk_toolbox_install.exe | |
./QMK.Toolbox.app.zip/QMK.Toolbox.app.zip | |
./QMK.Toolbox.pkg/QMK.Toolbox.pkg |