2022-10-07 09:20:19 +08:00
|
|
|
name: new-release
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
required: true
|
|
|
|
description: Release version including 0.
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
create-release:
|
2023-11-27 19:24:57 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-10-07 09:20:19 +08:00
|
|
|
outputs:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
steps:
|
|
|
|
- name: create release
|
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.event.inputs.version }}
|
|
|
|
release_name: ${{ github.event.inputs.version }}
|
|
|
|
draft: true
|
|
|
|
|
|
|
|
build:
|
|
|
|
needs: ["create-release"]
|
|
|
|
strategy:
|
2023-11-27 19:24:57 +08:00
|
|
|
matrix: # using ubuntu-20.04 to build a Linux binary targeting older glibc to improve compatibility
|
2023-01-07 04:17:25 +08:00
|
|
|
os: [{name: ubuntu, version: ubuntu-20.04}, {name: macos, version: macos-latest}, {name: windows, version: windows-latest}]
|
|
|
|
name: ${{matrix.os.name}}
|
|
|
|
runs-on: ${{matrix.os.version}}
|
2022-10-07 09:20:19 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: configure
|
|
|
|
run: cmake . -DCMAKE_BUILD_TYPE=Release
|
|
|
|
- name: build
|
2024-09-26 04:36:12 +08:00
|
|
|
run: cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI Luau.Compile.CLI Luau.Ast.CLI --config Release -j 2
|
2022-10-07 09:20:19 +08:00
|
|
|
- name: pack
|
2023-01-07 04:17:25 +08:00
|
|
|
if: matrix.os.name != 'windows'
|
|
|
|
run: zip luau-${{matrix.os.name}}.zip luau*
|
2022-10-07 09:20:19 +08:00
|
|
|
- name: pack
|
2023-01-07 04:17:25 +08:00
|
|
|
if: matrix.os.name == 'windows'
|
|
|
|
run: 7z a luau-${{matrix.os.name}}.zip .\Release\luau*.exe
|
2022-10-07 09:20:19 +08:00
|
|
|
- uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.create-release.outputs.upload_url }}
|
2023-01-07 04:17:25 +08:00
|
|
|
asset_path: luau-${{matrix.os.name}}.zip
|
|
|
|
asset_name: luau-${{matrix.os.name}}.zip
|
2022-10-07 09:20:19 +08:00
|
|
|
asset_content_type: application/octet-stream
|
|
|
|
|
|
|
|
web:
|
|
|
|
needs: ["create-release"]
|
2023-11-27 19:24:57 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-10-07 09:20:19 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: emscripten-core/emsdk
|
|
|
|
path: emsdk
|
|
|
|
- name: emsdk install
|
|
|
|
run: |
|
|
|
|
cd emsdk
|
|
|
|
./emsdk install latest
|
|
|
|
./emsdk activate latest
|
|
|
|
- name: make
|
|
|
|
run: |
|
|
|
|
source emsdk/emsdk_env.sh
|
|
|
|
emcmake cmake . -DLUAU_BUILD_WEB=ON -DCMAKE_BUILD_TYPE=Release
|
|
|
|
make -j2 Luau.Web
|
|
|
|
- uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.create-release.outputs.upload_url }}
|
|
|
|
asset_path: Luau.Web.js
|
|
|
|
asset_name: Luau.Web.js
|
|
|
|
asset_content_type: application/octet-stream
|