-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.2 KB
/
Copy pathbuild-standalone.yml
File metadata and controls
51 lines (41 loc) · 1.2 KB
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
name: Build standalone
on:
push:
paths:
- "src/**"
- "tools/build.lua"
workflow_dispatch:
permissions:
contents: write
concurrency:
group: build-standalone-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
name: Rebuild shale.lua
runs-on: ubuntu-latest
steps:
- name: Check out branch
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
- name: Update to latest branch revision
run: git pull --ff-only origin "$GITHUB_REF_NAME"
- name: Install Lua 5.1
run: |
sudo apt-get update
sudo apt-get install --yes lua5.1
- name: Build standalone file
run: lua5.1 tools/build.lua
- name: Commit generated standalone file
run: |
if git diff --quiet -- shale.lua; then
echo "shale.lua is already up to date."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add shale.lua
git commit -m "chore: rebuild standalone shale.lua"
git push origin "HEAD:${GITHUB_REF_NAME}"