Skip to content

Commit fa97171

Browse files
committed
Add build script and bump required SM version
1 parent cf12e3c commit fa97171

File tree

2 files changed

+81
-1
lines changed

2 files changed

+81
-1
lines changed

.github/workflows/main.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Compile and release
2+
3+
on:
4+
push:
5+
branches:
6+
master
7+
8+
env:
9+
PLUGIN_NAME: prophunt
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
sm-version: [ '1.12.x' ]
17+
permissions:
18+
contents: write
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set environment variables
24+
run: echo SCRIPTS_PATH=$(pwd) >> $GITHUB_ENV
25+
26+
- name: Download includes
27+
run: |
28+
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/FlaminSarge/tf2attributes/master/scripting/include/tf2attributes.inc
29+
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/asherkin/TF2Items/master/pawn/tf2items.inc
30+
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/nosoop/SM-TFUtils/master/scripting/include/tf2utils.inc
31+
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/nosoop/SM-TFEconData/master/scripting/include/tf_econ_data.inc
32+
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/DoctorMcKay/sourcemod-plugins/master/scripting/include/morecolors.inc
33+
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/sigsegv-mvm/StaticProps/master/scripting/include/StaticProps.inc
34+
35+
- name: Setup SourcePawn Compiler ${{ matrix.sm-version }}
36+
id: setup_sp
37+
uses: rumblefrog/setup-sp@master
38+
with:
39+
version: ${{ matrix.sm-version }}
40+
version-file: ./addons/sourcemod/scripting/${{ env.PLUGIN_NAME }}.sp
41+
define-name: PLUGIN_VERSION
42+
43+
- name: Compile plugins
44+
run: |
45+
mkdir ../plugins
46+
spcomp -v2 -E -i "include" -o"../plugins/${{ env.PLUGIN_NAME }}.smx" ${{ env.PLUGIN_NAME }}.sp
47+
echo "===OUT FILES==="
48+
ls ../plugins
49+
echo "===VERSION==="
50+
echo ${{ steps.setup_sp.outputs.plugin-version }}
51+
working-directory: ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting
52+
53+
- name: Install zip
54+
uses: montudor/action-zip@v1
55+
56+
- name: Zip output
57+
run: |
58+
zip -qq -y -r ${{ github.event.repository.name }}.zip addons scripts
59+
working-directory: ${{ env.SCRIPTS_PATH }}
60+
61+
- name: List files in the directory
62+
run: ls -R
63+
working-directory: ${{ env.SCRIPTS_PATH }}
64+
65+
- name: List files in the zip
66+
run: unzip -l ${{ github.event.repository.name }}.zip
67+
working-directory: ${{ env.SCRIPTS_PATH }}
68+
69+
- name: Create Release
70+
uses: ncipollo/release-action@v1
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
with:
74+
token: ${{ secrets.GITHUB_TOKEN }}
75+
tag: ${{ steps.setup_sp.outputs.plugin-version }}
76+
artifacts: ${{ github.event.repository.name }}.zip
77+
draft: true
78+
allowUpdates: true
79+
updateOnlyUnreleased: true
80+
skipIfReleaseExists: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ AlliedModders forum thread: https://forums.alliedmods.net/showthread.php?p=27712
2222

2323
## Requirements
2424

25-
* SourceMod 1.11+
25+
* SourceMod 1.12+
2626
* [StaticProps](https://github.com/sigsegv-mvm/StaticProps)
2727
* [TF2Items](https://github.com/asherkin/TF2Items)
2828
* [TF2 Econ Data](https://github.com/nosoop/SM-TFEconData)

0 commit comments

Comments
 (0)