-
Notifications
You must be signed in to change notification settings - Fork 5
67 lines (56 loc) · 2.19 KB
/
release.yaml
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
on:
release:
types: [created]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux-native, linux-proton, windows, macos]
steps:
- uses: actions/checkout@v4
- name: Get Current Release
id: get_current_release
uses: joutvhu/get-release@v1
with:
debug: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create directories
run: |
mkdir -p balamod-${{ matrix.platform }}
- name: Download Linux Lua HTTPS files
if: ${{ matrix.platform == 'linux-native' }}
run: |
curl -LO https://github.com/balamod/lua-https/releases/download/v1.0.1/linux-https.so
mv linux-https.so balamod-${{matrix.platform}}/https.so
- name: Download MacOS Lua HTTPS files
if: ${{ matrix.platform == 'macos' }}
run: |
curl -LO https://github.com/balamod/lua-https/releases/download/v1.0.1/macos-https.so
mv macos-https.so balamod-${{matrix.platform}}/https.so
- name: Download Windows Lua HTTPS files
if: ${{ matrix.platform == 'windows' || matrix.platform == 'linux-proton' }}
run: |
curl -LO https://github.com/balamod/lua-https/releases/download/v1.0.1/windows-x64-https.dll
mv windows-x64-https.dll balamod-${{matrix.platform}}/https.dll
- name: Copy source files into directory
run: |
cp src/*.lua balamod-${{matrix.platform}}
- name: Generate version file
run: |
echo "return \"$(git describe --tags --always)\"" > balamod-${{matrix.platform}}/balamod_version.lua
- name: Create tarball with balamod files
run: |
tar czf balamod-${{matrix.platform}}.tar.gz balamod-${{matrix.platform}}/*
- name: Upload Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_current_release.outputs.upload_url }}
asset_path: ./balamod-${{matrix.platform}}.tar.gz
asset_name: balamod-${{matrix.platform}}.tar.gz
asset_content_type: application/gzip