-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.72 KB
/
Copy pathrelease.yml
File metadata and controls
55 lines (51 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: MIT
#
# Build the C++ app on macOS / Linux / Windows and attach the binaries
# to the GitHub Release for the pushed tag (e.g. `git tag v0.1.0 && git push --tags`).
name: release
on:
push:
tags: ["v*"]
workflow_dispatch: # allow manual runs for testing
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
asset: node-editor-linux-x64
- os: macos-latest
asset: node-editor-macos-arm64
- os: windows-latest
asset: node-editor-windows-x64.exe
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable # Slint C++ is fetched & built from source
- name: Linux deps
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev
- name: Configure & build
run: |
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
- name: Stage binary (Unix)
if: runner.os != 'Windows'
run: cp build/node-editor "${{ matrix.asset }}"
- name: Stage binary (Windows)
if: runner.os == 'Windows'
shell: bash
run: cp build/Release/node-editor.exe "${{ matrix.asset }}"
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset }}
path: ${{ matrix.asset }}
- name: Attach to release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.asset }}