forked from PhlexPlexico/G5WS
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (89 loc) · 3.67 KB
/
make_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
# This is a basic workflow to help you get started with Actions
name: Create Release Executable
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: Compile And Tag Pre-Release
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Get shorthand commit for release titles.
id: vars
run: echo "::set-output name=sha_short::$(echo ${{ github.sha }} | cut -c1-6)"
# Runs a set of commands using the runners shell
- name: Build Project
run: |
download_files() {
wget https://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6499-linux.tar.gz
wget https://raw.githubusercontent.com/KyleSanderson/SteamWorks/1.2.3c/Pawn/includes/SteamWorks.inc
}
init_submodule() {
git submodule update --init
cd get5
git submodule update --init
cd ../
}
create_temp_directory() {
mkdir tmp
}
untar_files() {
mv *.tar* tmp/
mv *.inc* tmp/
cd tmp
tar -zxf sourcemod*.tar.gz
}
move_api_files() {
mkdir -p ./addons/sourcemod/scripting/get5
cp -r ../scripting/* ./addons/sourcemod/scripting/
cp -f ./SteamWorks.inc ./addons/sourcemod/scripting/include/SteamWorks.inc
cp -f ../get5/scripting/include/get5.inc ./addons/sourcemod/scripting/include/get5.inc
cp -f ../get5/scripting/include/logdebug.inc ./addons/sourcemod/scripting/include/logdebug.inc
cp -f ../get5/scripting/get5/util.sp ./addons/sourcemod/scripting/get5/util.sp
cp -r ../get5/dependencies/sm-json/addons/sourcemod/scripting/include/* ./addons/sourcemod/scripting/include/
}
compile() {
cd ./addons/sourcemod/scripting
chmod +x spcomp64
./spcomp64 G5WS.sp
mv G5WS.smx ../../../../
}
remove_tmp() {
cd ../../../../
rm -rf ./tmp/
git submodule deinit --force --all
}
create_zip() {
zip G5WS G5WS.smx
rm -f G5WS.smx
}
download_files
init_submodule
create_temp_directory
untar_files
move_api_files
compile
remove_tmp
create_zip
- name: Create a Release
id: create_release
uses: ncipollo/release-action@v1.8.3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
commit: "${{ github.sha }}"
tag: "Nightly-${{ steps.vars.outputs.sha_short }}"
name: "Nightly-${{ steps.vars.outputs.sha_short }}"
artifacts: "G5WS.zip"
body: |
Please note that these pre-release builds are currently bleeding edge and contain the latest features that are on the master branch.
When reporting issues, please list the nightly title for the plugin version you are using as it will help with debugging problems!