-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (79 loc) · 2.56 KB
/
Copy pathrelease.yml
File metadata and controls
88 lines (79 loc) · 2.56 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Build and Release ShellLite
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build-release:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
artifact_name: shlcpp-windows-x64.zip
target: windows
- os: ubuntu-latest
artifact_name: shlcpp-linux-x64.tar.gz
target: linux
- os: macos-latest
artifact_name: shlcpp-macos-universal.tar.gz
target: macos
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Linux Dependencies
if: matrix.target == 'linux'
run: sudo apt-get update && sudo apt-get install -y libsdl2-dev libcurl4-openssl-dev cmake build-essential libxcb1-dev libx11-dev libpng-dev
- name: Configure MSVC (Windows)
if: matrix.target == 'windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Build ShellLite (Windows)
if: matrix.target == 'windows'
shell: pwsh
run: |
mkdir build_cpp
cd build_cpp
cmake ..
cmake --build . --config Release
cd ..
mkdir package
copy build_cpp\Release\shell_lite_exec.exe package\shlcpp.exe
copy build_cpp\Release\shell_lite_lib.dll package\shell_lite_lib.dll
xcopy /E /I shell_lite\stdlib package\stdlib
Compress-Archive -Path package\* -DestinationPath ${{ matrix.artifact_name }}
- name: Build ShellLite (Linux)
if: matrix.target == 'linux'
run: |
mkdir build_cpp
cd build_cpp
cmake ..
cmake --build . --config Release
cd ..
mkdir package
cp build_cpp/shell_lite_exec package/shlcpp
cp -r shell_lite/stdlib package/stdlib
tar -czvf ${{ matrix.artifact_name }} -C package .
- name: Build ShellLite (macOS)
if: matrix.target == 'macos'
run: |
mkdir build_cpp
cd build_cpp
cmake ..
cmake --build . --config Release
cd ..
mkdir package
cp build_cpp/shell_lite_exec package/shlcpp
cp -r shell_lite/stdlib package/stdlib
tar -czvf ${{ matrix.artifact_name }} -C package .
- name: Upload Release Asset
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.artifact_name }}
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}