-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (57 loc) · 1.69 KB
/
Copy pathbuild.yml
File metadata and controls
70 lines (57 loc) · 1.69 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build
on:
push:
branches: [ "main", "hotfix" ]
paths:
- "src/telem/**"
pull_request:
branches: [ "main", "hotfix" ]
paths:
- "src/telem/**"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: fregante/setup-git-user@v2
- uses: leafo/gh-actions-lua@v11
with:
luaVersion: "5.3"
- uses: leafo/gh-actions-luarocks@v4
- name: Install luacc
run: luarocks install luacc
- name: Install luamin
run: sudo yarn global add https://github.com/cyberbit/luamin
- name: Build
run: ./src/telem/build.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: modules-flat
path: dist/modules/*.lua
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: modules-luz
path: dist/modules/*.luz
# via https://github.com/softprops/action-gh-release/issues/270
- name: Tag
id: tag
if: ${{ github.ref == 'refs/heads/main' }}
run: |
TAG=v0.0.0+$(date -Iseconds | sed 's/[-T:\+]//g')
echo "$TAG"
echo "tag=$TAG" >> $GITHUB_OUTPUT
git tag -a $TAG -m "Published version $TAG" ${GITHUB_SHA}
git push origin $TAG
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ github.ref == 'refs/heads/main' }}
with:
prerelease: true
draft: true
tag_name: ${{ steps.tag.outputs.tag }}
files: |
dist/modules/*.lua
dist/modules/*.luz