forked from shavitush/bhoptimer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from shavitush/master
aa
- Loading branch information
Showing
39 changed files
with
2,891 additions
and
1,116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Compile | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
compile: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
sm-version: [ '1.10', '1.11' ] #, '1.12' | ||
|
||
name: "Build SM ${{ matrix.sm-version }}" | ||
steps: | ||
- name: Prepare env | ||
shell: bash | ||
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup SP | ||
uses: rumblefrog/setup-sp@master | ||
with: | ||
version: ${{ matrix.sm-version }} | ||
|
||
- name: Download and extract dependencies | ||
shell: bash | ||
run: | | ||
# Mac zip just because it's smaller & we don't repack the extensions... | ||
wget https://github.com/ErikMinekus/sm-ripext/releases/download/1.3.1/sm-ripext-1.3.1-mac.zip | ||
unzip sm-ripext-1.3.1-mac.zip "addons/sourcemod/scripting/include/*" | ||
wget https://github.com/clugg/sm-json/archive/refs/tags/v5.0.0.tar.gz | ||
tar --strip-components=1 -xvzf v5.0.0.tar.gz sm-json-5.0.0/addons/sourcemod/scripting/include | ||
wget https://github.com/hermansimensen/eventqueue-fix/archive/refs/tags/1.3.2.tar.gz | ||
tar --strip-components=1 -xvzf 1.3.2.tar.gz -C addons/sourcemod | ||
rm -rf *.zip *.tar.gz addons/sourcemod/.git* addons/sourcemod/LICENSE | ||
- name: Run compiler | ||
shell: bash | ||
run: | | ||
cd addons/sourcemod | ||
mkdir plugins | ||
for src in $(find scripting -maxdepth 1 -type f -name "*.sp"); | ||
do | ||
spcomp $src -o=plugins/$(basename $src .sp)'.smx' -i=scripting/include -v2 | ||
done | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: bhoptimer-${{ github.head_ref || github.ref_name }}-sm${{ matrix.sm-version }}-${{ env.GITHUB_SHA_SHORT }} | ||
path: | | ||
addons | ||
materials | ||
sound | ||
CHANGELOG.md | ||
LICENSE | ||
README.md | ||
retention-days: 14 | ||
|
||
release: | ||
name: Release | ||
if: github.ref_type == 'tag' | ||
needs: compile | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
|
||
- name: Archive artifacts | ||
shell: bash | ||
run: find * -maxdepth 0 -type d -exec zip -rq {}.zip {} \; | ||
|
||
- uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
draft: true | ||
name: ${{ github.ref_name }} | ||
artifacts: "*.zip" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.