Nightly Release #858
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: Nightly Release | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" # Runs at 00:00 UTC every day | |
jobs: | |
dist: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
artifact-name: luau-lsp-win64 | |
code-target: [win32-x64] | |
- os: ubuntu-20.04 | |
artifact-name: luau-lsp-linux | |
code-target: [linux-x64] | |
- os: macos-latest | |
artifact-name: luau-lsp-macos | |
code-target: [darwin-x64, darwin-arm64] | |
name: ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
submodules: true | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Build Server | |
run: | | |
mkdir build && cd build | |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DLSP_STATIC_CRT:BOOL=ON -DLUAU_ENABLE_TIME_TRACE:BOOL=ON .. | |
cmake --build . --config RelWithDebInfo --target Luau.LanguageServer.CLI -j 3 | |
- name: (MacOS) Verify universal build | |
if: matrix.os == 'macos-latest' | |
run: lipo -archs build/luau-lsp | |
- name: Copy Build into Extension | |
shell: bash | |
run: | | |
mkdir -p ./dist | |
mkdir -p editors/code/bin | |
if [ "${{ matrix.os }}" = "windows-latest" ]; then | |
cp build/RelWithDebInfo/luau-lsp.exe editors/code/bin/server.exe | |
cp build/RelWithDebInfo/luau-lsp.pdb editors/code/bin/server.pdb | |
else | |
cp build/luau-lsp editors/code/bin/server | |
chmod 777 editors/code/bin/server | |
fi | |
- name: Create Release Archive | |
shell: bash | |
run: | | |
mkdir staging | |
if [ "${{ matrix.os }}" = "windows-latest" ]; then | |
cp "build/RelWithDebInfo/luau-lsp.exe" staging/ | |
cd staging | |
7z a ../dist/server.zip * | |
else | |
cp "build/luau-lsp" staging/ | |
cd staging | |
zip ../dist/server.zip * | |
fi | |
- name: Copy README, CHANGELOG, LICENSE | |
shell: bash | |
run: | | |
rm -f editors/code/README.md | |
cp README.md editors/code/README.md | |
rm -f editors/code/CHANGELOG.md | |
cp CHANGELOG.md editors/code/CHANGELOG.md | |
rm -f editors/code/LICENSE.md | |
cp LICENSE.md editors/code/LICENSE | |
- run: npm ci | |
working-directory: editors/code | |
- name: Package Extension | |
working-directory: editors/code | |
run: npx vsce package -o "../../dist/${{ matrix.artifact-name }}.vsix" | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nightly-${{ matrix.artifact-name }} | |
path: ./dist |