Skip to content

Commit 6c3fccc

Browse files
authored
Support manual nightly release with python option (#328)
1 parent 0e300f6 commit 6c3fccc

File tree

4 files changed

+43
-8
lines changed

4 files changed

+43
-8
lines changed

.github/actions/setup-and-build/action.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ inputs:
1313
description: "Additional luthier options"
1414
required: false
1515
default: ""
16+
use-python-luthier:
17+
description: "Builds with the python version of luthier"
18+
type: boolean
19+
required: false
20+
default: false
1621
token:
1722
description: "Token for foreman"
1823
required: true
@@ -25,6 +30,24 @@ outputs:
2530
runs:
2631
using: "composite"
2732
steps:
33+
- name: Set runtime variables
34+
id: run
35+
shell: bash
36+
run: |
37+
if [ "${{ inputs.use-python-luthier }}" = "true" ]; then
38+
echo "runtime=python" >> "$GITHUB_OUTPUT"
39+
echo "ext=py" >> "$GITHUB_OUTPUT"
40+
else
41+
echo "runtime=lute" >> "$GITHUB_OUTPUT"
42+
echo "ext=luau" >> "$GITHUB_OUTPUT"
43+
fi
44+
45+
- name: Set up Python
46+
if: inputs.use-python-luthier
47+
uses: actions/setup-python@v5
48+
with:
49+
python-version: "3.11"
50+
2851
- name: Install tools
2952
uses: Roblox/setup-foreman@v3
3053
with:
@@ -63,20 +86,20 @@ runs:
6386
- name: Fetch ${{ inputs.target }}
6487
if: steps.cache-extern.outputs.cache-hit != 'true'
6588
shell: bash
66-
run: lute ./tools/luthier.luau fetch ${{ inputs.target }}
89+
run: ${{ steps.run.outputs.runtime }} ./tools/luthier.${{ steps.run.outputs.ext }} fetch ${{ inputs.target }}
6790

6891
- name: Configure ${{ inputs.target }}
6992
shell: bash
70-
run: lute ./tools/luthier.luau configure ${{ inputs.target }} --config ${{ inputs.config }} ${{ inputs.options }}
93+
run: ${{ steps.run.outputs.runtime }} ./tools/luthier.${{ steps.run.outputs.ext }} configure ${{ inputs.target }} --config ${{ inputs.config }} ${{ inputs.options }}
7194

7295
- name: Build ${{ inputs.target }}
7396
shell: bash
74-
run: lute ./tools/luthier.luau build ${{ inputs.target }} --config ${{ inputs.config }} ${{ inputs.options }}
97+
run: ${{ steps.run.outputs.runtime }} ./tools/luthier.${{ steps.run.outputs.ext }} build ${{ inputs.target }} --config ${{ inputs.config }} ${{ inputs.options }}
7598

7699
- name: Get Artifact Path
77100
id: artifact_path
78101
shell: bash
79102
run: |
80-
exe_path=$(lute ./tools/luthier.luau build ${{ inputs.target }} --config ${{ inputs.config }} --which)
103+
exe_path=$(${{ steps.run.outputs.runtime }} ./tools/luthier.${{ steps.run.outputs.ext }} build ${{ inputs.target }} --config ${{ inputs.config }} --which)
81104
echo "Executable path: $exe_path" # Debug print
82105
echo "exe_path=$exe_path" >> "$GITHUB_OUTPUT"

.github/workflows/release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ on:
44
schedule:
55
- cron: '0 0 * * *'
66
workflow_dispatch:
7+
inputs:
8+
use-python-luthier:
9+
description: "Use the Python version of Luthier"
10+
required: false
11+
default: false
12+
type: boolean
13+
nightly:
14+
description: "Trigger a nightly build"
15+
required: false
16+
default: false
17+
type: boolean
718

819
jobs:
920
check:
@@ -84,6 +95,7 @@ jobs:
8495
config: release
8596
options: ${{ matrix.options }}
8697
token: ${{ secrets.GITHUB_TOKEN }}
98+
use-python-luthier: ${{ github.event.inputs.use-python-luthier }}
8799

88100
- name: Upload Artifact
89101
uses: actions/upload-artifact@v4
@@ -124,7 +136,7 @@ jobs:
124136
125137
- name: Create Nightly Tag
126138
id: tag_step
127-
if: github.event_name == 'schedule'
139+
if: github.event_name == 'schedule' || github.event.inputs.nightly
128140
run: |
129141
DATE=$(date +%Y%m%d)
130142
TAG="-nightly.$DATE"
@@ -144,5 +156,5 @@ jobs:
144156
tag_name: ${{ steps.tag_release.outputs.tag }}
145157
name: ${{ steps.tag_release.outputs.tag }}
146158
draft: false
147-
prerelease: ${{ github.event_name == 'schedule' }}
159+
prerelease: ${{ github.event.inputs.nightly || github.event_name == 'schedule' }}
148160
files: release/*.zip

foreman.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[tools]
22
stylua = { github = "JohnnyMorganz/StyLua", version = "2.0.2" }
3-
lute = { github = "luau-lang/lute", version = "0.1.0-nightly.20250503" }
3+
lute = { github = "luau-lang/lute", version = "0.1.0-nightly.20250604" }

rokit.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[tools]
22
stylua = "JohnnyMorganz/StyLua@2.0.2"
3-
lute = "luau-lang/lute@0.1.0-nightly.20250503"
3+
lute = "luau-lang/lute@0.1.0-nightly.20250604"

0 commit comments

Comments
 (0)