Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Build Lua Distributions

on:
- push
- workflow_dispatch
on: [push, workflow_dispatch]

permissions:
contents: read
Expand All @@ -26,12 +24,8 @@ jobs:
sparse-checkout: luau
- name: Configure with CMake
run: |
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${{ matrix.os.name != 'windows' && '-ffp-contract=off' || '' }}" -DCMAKE_C_FLAGS="${{ matrix.os.name != 'windows' && '-ffp-contract=off' || '' }}"
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="${{ matrix.os.name == 'macos' && 'x86_64;arm64' || '' }}" -DCMAKE_CXX_FLAGS="${{ matrix.os.name != 'windows' && '-ffp-contract=off' || '' }}" -DCMAKE_C_FLAGS="${{ matrix.os.name != 'windows' && '-ffp-contract=off' || '' }}"
- name: Build with CMake
env:
# Create fat binary on macOS for compatibility with ARM64 and Intel
# (for compatibility with older macintosh devices)
CMAKE_OSX_ARCHITECTURES: ${{ matrix.os.name == 'macos' && 'x86_64;arm64' || '' }}
run: |
cmake --build . --target Luau.Repl.CLI Luau.Compile.CLI --config Release -j 2
- name: Upload artifact
Expand Down Expand Up @@ -149,22 +143,43 @@ jobs:
delete-merged: true
compression-level: 9
- name: Download merged artifact
if: ${{ github.event_name == 'workflow_dispatch' }}
if: github.ref == 'refs/heads/main'
uses: actions/download-artifact@v7
with:
name: crosslua-build
path: crosslua-build
- name: Generate .zip file with archives
if: ${{ github.event_name == 'workflow_dispatch' }}
if: github.ref == 'refs/heads/main'
run: zip -r -9 crosslua-build.zip crosslua-build/*
- name: Create release
if: ${{ github.event_name == 'workflow_dispatch' }}
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
name: CrossLua ${{ github.event.started_at }}
tag_name: v${{ github.run_number }}
name: CrossLua Build ${{ github.run_number }}
body: This release was automatically generated by a build script.
files: crosslua-build.zip
fail_on_unmatched_files: true
prerelease: false
draft: false
make_latest: true
dependabot:
needs: [build-luau, build-luajit, build-lua]
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
steps:
- id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- run: |
gh pr review --approve "$PR_URL"
gh pr merge --squash --auto "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}