-
Notifications
You must be signed in to change notification settings - Fork 8
64 lines (50 loc) · 1.89 KB
/
ci.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
on:
push:
tags:
- 'v*'
name: Create Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: rumblefrog/[email protected]
- run: |
mkdir -p addons/sourcemod/plugins include
cp -r scripting gamedata addons/sourcemod/
curl -o include/dhooks.inc \
https://raw.githubusercontent.com/peace-maker/DHooks2/dynhooks/sourcemod_files/scripting/include/dhooks.inc
spcomp \
-i include \
addons/sourcemod/scripting/tf2-comp-fixes.sp \
-o addons/sourcemod/plugins/tf2-comp-fixes.smx
zip tf2-comp-fixes $(find addons -type f)
cp updatefile.txt addons/sourcemod/
- uses: actions/create-release@latest
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tf2-comp-fixes.zip
asset_name: tf2-comp-fixes.zip
asset_content_type: application/zip
- id: check_prerelease
run: |
if echo '${{ github.event.ref }}' | grep -P '^refs\/tags\/v[0-9]+\.[0-9]+\.[0-9]+(?:-((?:[0-9]+|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:[0-9]+|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'; then
echo ::set-output name=match::true
else
echo ::set-output name=match::false
fi
- uses: peaceiris/actions-gh-pages@v3
if: steps.check_prerelease.outputs.match != 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: updater
publish_dir: addons/sourcemod