-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.54 KB
/
Copy pathrelease.yml
File metadata and controls
63 lines (50 loc) · 1.54 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
name: Release
on:
push:
branches:
- master
paths:
- 'src/release.lua'
jobs:
preprocess:
name: Preprocess, link and create release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: leafo/gh-actions-lua@v8.0.0
with:
luaVersion: "5.2"
- uses: leafo/gh-actions-luarocks@v4.0.0
- name: Install LuaFileSystem
run: luarocks install luafilesystem
- name: Generate preprocessed debug and release modules
run: lua preprocess.lua
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: "3.8"
- name: Install slpp and requests
run: pip install requests git+https://github.com/SirAnthony/slpp
- name: Run linker
id: linker
run: python link.py
- name: Zip built files
run: zip -r ../dist.zip *
working-directory: ./dist
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.linker.outputs.version }}
release_name: ${{ steps.linker.outputs.version }}
- name: Upload assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist.zip
asset_name: dist.zip
asset_content_type: application/zip