forked from ValveSoftware/source-sdk-2013
-
-
Notifications
You must be signed in to change notification settings - Fork 19
76 lines (67 loc) · 2.2 KB
/
Copy pathbuild_linux.yml
File metadata and controls
76 lines (67 loc) · 2.2 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
76
name: Build - Linux
on:
push:
branches:
- "*"
- "release/*"
jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.REPO_TOKEN }}
submodules: recursive
- name: Setup ccache
id: setup-ccache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.ccache
key: ${{ runner.os }}-ccache-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-${{ github.ref_name }}-
${{ runner.os }}-ccache-${{ github.base_ref }}-
${{ runner.os }}-ccache-tc2-mod-
- name: Build dist
id: build-dist
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESSLEVEL: 6
run: |
mkdir -p $CCACHE_DIR
./src/buildallprojects
./game_clean/copy.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: game
path: |
game_dist
- name: Archive debug info
uses: actions/upload-artifact@v4
with:
name: game-debug-info
path: |
game_dist_debug
- name: Package Release
id: package-rel
if: ${{ (github.repository_owner == 'mastercomfig' || github.repository_owner == 'mastercoms') && github.event_name == 'push' && (github.ref == 'refs/heads/tc2-mod' || startsWith(github.ref, 'refs/heads/release/')) }}
run: |
rm -rf game_dist_debug
(cd game_dist && 7z a -r ../game-linux.zip '*')
shell: bash
- name: Push Release
id: create-rel
if: ${{ (github.repository_owner == 'mastercomfig' || github.repository_owner == 'mastercoms') && github.event_name == 'push' && (github.ref == 'refs/heads/tc2-mod' || startsWith(github.ref, 'refs/heads/release/')) }}
run: |
./game_clean/tag.sh
rm game-linux.zip
shell: bash
env:
GH_TOKEN: ${{secrets.REPO_TOKEN}}
- name: Cleanup
id: cleanup
run: |
rm -rf game_dist
git clean -xfd -- game src