Skip to content

Commit

Permalink
update to new Sourcemod syntax
Browse files Browse the repository at this point in the history
remove Rakefile;  replace with Makefile
change LICENSE to GPL 3
remove Travis CI;  replace with github workflow
target sourcemod versions 1.10, 1.11
update include files to use new syntax
update .gitignore
fix off by one issue with MaxClients
change forward OnClientPostAdminCheck to OnClientPutInServer
remove plan file
remove tabs
do not prepend "configs/" to foz_config file path
add manual config reload
  • Loading branch information
CrimsonTautology committed Mar 14, 2021
1 parent 6271340 commit f7b70f9
Show file tree
Hide file tree
Showing 34 changed files with 3,373 additions and 2,572 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build plugins

on:
push:
pull_request:
schedule:
- cron: "0 4 * * 5"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
sm-version: ['1.10', '1.11']

name: build plugins
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up SourceMod compiler
uses: rumblefrog/setup-sp@master
with:
version: ${{ matrix.sm-version }}

- name: Compile SourceMod plugins
run: make clean compile test SPCOMP=spcomp SPFLAGS=-E
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Create release

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:
runs-on: ubuntu-latest

name: Create release
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up environment
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Set up SourceMod compiler
uses: rumblefrog/setup-sp@master
with:
version: '1.10'

- name: Compile SourceMod plugins and archive
run: make release.tar.gz release.zip SPCOMP=spcomp

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload release asset as tar.gz
id: upload-release-asset-tgz
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./release.tar.gz
asset_name: ${{ github.event.repository.name }}-${{ env.RELEASE_VERSION }}.tar.gz
asset_content_type: application/gzip

- name: Upload release asset as zip
id: upload-release-asset-zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./release.zip
asset_name: ${{ github.event.repository.name }}-${{ env.RELEASE_VERSION }}.zip
asset_content_type: application/zip
18 changes: 11 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#compiled files
# compiled files
*.smx
*.exe
*.o
#fof_gungame_orig.sp
*.asm
*.lst
*.so

#vim files
# vim files
*.sw*

#Ignore the settings file
Sourcemodproject.yml
# tags
tags

# release
*release.tar.gz
*release.zip
Loading

0 comments on commit f7b70f9

Please sign in to comment.