-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (58 loc) · 2.08 KB
/
publish.yml
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
name: Publish
permissions:
contents: write
on:
push:
tags:
- "v*.*.*"
jobs:
create-release:
strategy:
matrix:
os: [{name: ubuntu, version: ubuntu-24.04}, {name: windows, version: windows-latest}]
runs-on: ${{matrix.os.version}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
- name: Checkout cppdap
uses: actions/checkout@v4
with:
repository: google/cppdap
path: cppdap
- name: init cppdap submodules
working-directory: ./cppdap
run: git submodule update --init
- name: Checkout luau
uses: actions/checkout@v4
with:
repository: luau-lang/luau
path: luau
- name: install compiler for windows
if: matrix.os.name == 'windows'
run: |
choco install ninja
choco install llvm
- name: configure for windows
if: matrix.os.name == 'windows'
run: cmake -DCPP_DAP_ROOT=${{ github.workspace }}/cppdap -DLUAU_ROOT=${{ github.workspace }}/luau . --preset windows-publish-configure
- name: build for windows
if: matrix.os.name == 'windows'
run: cmake --build --preset windows-publish-build
- name: pack for windows
if: matrix.os.name == 'windows'
run: 7z a luaud-${{ matrix.os.name }}.zip ${{ github.workspace }}\build\luaud\luaud.exe
- name: configure for ubuntu
if: matrix.os.name == 'ubuntu'
run: cmake -DCPP_DAP_ROOT=${{ github.workspace }}/cppdap -DLUAU_ROOT=${{ github.workspace }}/luau . --preset linux-clang-release
- name: build for ubuntu
if: matrix.os.name == 'ubuntu'
run: cmake --build --preset linux-clang-release-build
- name: pack for ubuntu
if: matrix.os.name == 'ubuntu'
run: zip -j luaud-${{ matrix.os.name }}.zip ${{ github.workspace }}/build/luaud/luaud
- uses: softprops/action-gh-release@v2
with:
files: luaud-${{ matrix.os.name }}.zip