-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (95 loc) · 3.49 KB
/
lua_release.yml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Release
on:
release:
types: [created]
env:
CARGO_TERM_COLOR: always
jobs:
release:
strategy:
fail-fast: false
matrix:
include:
# Full version
- os: ubuntu-20.04
name: full luajit release ubuntu-20.04
flags: --features default
artifact_name: astra
asset_name: astra-full-luajit-linux-amd64
- os: windows-2022
name: full luajit release windows-2022
flags: --features default
artifact_name: astra.exe
asset_name: astra-full-luajit-windows-amd64.exe
## Luau
- os: ubuntu-20.04
name: full luau release ubuntu-20.04
flags: --no-default-features --features luau,utils_luau
artifact_name: astra
asset_name: astra-full-luau-linux-amd64
- os: windows-2022
name: full luau release windows-2022
flags: --no-default-features --features luau,utils_luau
artifact_name: astra.exe
asset_name: astra-full-luau-windows-amd64.exe
# Core version
- os: ubuntu-20.04
name: core luajit release ubuntu-20.04
flags: "--no-default-features --features luajit"
artifact_name: astra
asset_name: astra-core-luajit-linux-amd64
- os: windows-2022
name: core luajit release windows-2022
flags: "--no-default-features --features luajit"
artifact_name: astra.exe
asset_name: astra-core-luajit-windows-amd64.exe
# Luau
- os: ubuntu-20.04
name: core luau release ubuntu-20.04
flags: "--no-default-features --features luau"
artifact_name: astra
asset_name: astra-core-luau-linux-amd64
- os: windows-2022
name: core luau release windows-2022
flags: "--no-default-features --features luau"
artifact_name: astra.exe
asset_name: astra-core-luau-windows-amd64.exe
name: ${{ matrix.name }}
runs-on: '${{ matrix.os }}'
environment: production
env:
CARGO_INCREMENTAL: 0
cache-key: "cargo-cache"
steps:
- uses: actions/checkout@v4
- name: Build Server
run: cargo build --release ${{ matrix.flags }}
- name: Upload server binary to release
uses: svenstaro/upload-release-action@v2
with:
file: ./target/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
- uses: chrnorm/deployment-action@v2
name: Create GitHub deployment
id: deployment
with:
token: "${{ github.token }}"
environment-url: https://github.com/ArkForgeLabs/Astra
environment: production
- name: Update deployment status (success)
if: success()
uses: chrnorm/deployment-status@v2
with:
token: "${{ github.token }}"
environment-url: ${{ steps.deployment.outputs.environment_url }}
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
state: "success"
- name: Update deployment status (failure)
if: failure()
uses: chrnorm/deployment-status@v2
with:
token: "${{ github.token }}"
environment-url: ${{ steps.deployment.outputs.environment_url }}
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
state: "failure"