-
Notifications
You must be signed in to change notification settings - Fork 9
75 lines (64 loc) · 1.85 KB
/
Copy pathbuild.yml
File metadata and controls
75 lines (64 loc) · 1.85 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
71
72
73
74
75
name: CI
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: windows-latest
env:
HL2SDKCS2: ${{ github.workspace }}/hl2sdk-cs2
MMSOURCE_DEV: ${{ github.workspace }}/mmsource-2.0
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: CS2ServerGUI
submodules: recursive
fetch-depth: 0
- name: Checkout Metamod
uses: actions/checkout@v7
with:
repository: alliedmodders/metamod-source
ref: master
path: mmsource-2.0
submodules: recursive
- name: Checkout HL2SDK
uses: actions/checkout@v7
with:
repository: alliedmodders/hl2sdk
ref: cs2
path: hl2sdk-cs2
- name: Install xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '3.1.0'
- name: Build
working-directory: CS2ServerGUI
run: |
xmake config --mode=release --yes
xmake --yes
xmake pack --yes CS2ServerGUI
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: CS2ServerGUI
path: CS2ServerGUI/build/xpack/CS2ServerGUI
release:
name: Release
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v8
- name: Package
run: |
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`
ls -Rall
zip -r ${{ github.event.repository.name }}-${version}-windows.zip *
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.event.repository.name }}-*
tag: ${{ github.ref }}
file_glob: true