-
-
Notifications
You must be signed in to change notification settings - Fork 2
74 lines (61 loc) · 2.29 KB
/
main.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
name: Compile and release
on:
push:
branches:
master
env:
PLUGIN_NAME: friendlyfire
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
sm-version: [ '1.11.x' ]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set environment variables
run: echo SCRIPTS_PATH=$(pwd) >> $GITHUB_ENV
- name: Download includes
run: wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/nosoop/SM-TFUtils/master/scripting/include/tf2utils.inc
- name: Setup SourcePawn Compiler ${{ matrix.sm-version }}
id: setup_sp
uses: rumblefrog/setup-sp@master
with:
version: ${{ matrix.sm-version }}
version-file: ./addons/sourcemod/scripting/${{ env.PLUGIN_NAME }}.sp
define-name: PLUGIN_VERSION
- name: Compile plugins
run: |
mkdir ../plugins
spcomp -v2 -E -i "include" -o"../plugins/${{ env.PLUGIN_NAME }}.smx" ${{ env.PLUGIN_NAME }}.sp
echo "===OUT FILES==="
ls ../plugins
echo "===VERSION==="
echo ${{ steps.setup_sp.outputs.plugin-version }}
working-directory: ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting
- name: Install zip
uses: montudor/action-zip@v1
- name: Zip output
run: |
zip -qq -y -r ${{ github.event.repository.name }}.zip configs plugins scripting extensions gamedata translations data
working-directory: ${{ env.SCRIPTS_PATH }}/addons/sourcemod
- name: List files in the directory
run: ls -R
working-directory: ${{ env.SCRIPTS_PATH }}/addons/sourcemod
- name: List files in the zip
run: unzip -l ${{ github.event.repository.name }}.zip
working-directory: ${{ env.SCRIPTS_PATH }}/addons/sourcemod
- name: Create Release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.setup_sp.outputs.plugin-version }}
artifacts: addons/sourcemod/${{ github.event.repository.name }}.zip
draft: true
allowUpdates: true
updateOnlyUnreleased: true
skipIfReleaseExists: true