-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (51 loc) · 1.43 KB
/
build.yaml
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
name: Build workflow
on:
push:
branches: master
paths-ignore: '**.md'
pull_request:
paths-ignore: '**.md'
release:
types: published
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout Source Scramble
uses: actions/checkout@v3
with:
repository: nosoop/SMExt-SourceScramble
path: sourcescramble
- name: Set up spcomp
uses: rumblefrog/setup-sp@master
with:
version: 1.11.x
- name: Compile plugin
working-directory: scripting/
env:
include: ${{ github.workspace }}/sourcescramble/scripting/include/
run: |
mkdir ../plugins
spcomp64 -v2 -E -i$include serverinfotext.sp -o ../plugins/serverinfotext.smx
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: package
path: plugins/serverinfotext.smx
upload-release:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: package
- name: Upload release asset
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: serverinfotext.smx