Skip to content

Commit

Permalink
refactor sourcemod projects
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
remove donator logic
donator plugin is no longer maintained or utalized
update README.md
bump version
  • Loading branch information
CrimsonTautology committed Mar 6, 2021
1 parent f0be820 commit 0473ac2
Show file tree
Hide file tree
Showing 38 changed files with 11,051 additions and 3,096 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 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: Setup environment
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Setup 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
16 changes: 12 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#compiled files
# compiled files
*.smx
*.exe
*.o
*.asm
*.lst
*.so

#vim files
# vim files
*.sw*

# tags
tags

# release
*release.tar.gz
*release.zip
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 0473ac2

Please sign in to comment.