From c994df1256325b928ec552f1dbcf497cd1051506 Mon Sep 17 00:00:00 2001 From: sapphonie Date: Tue, 16 Aug 2022 01:53:17 +0000 Subject: [PATCH] compile 1.10 + 1.11 --- .github/nv_compile.sh | 41 +++++++++++++++++++++++++ .github/workflows/nativevotes.yml | 51 +++++++++++-------------------- 2 files changed, 59 insertions(+), 33 deletions(-) create mode 100755 .github/nv_compile.sh diff --git a/.github/nv_compile.sh b/.github/nv_compile.sh new file mode 100755 index 0000000..e934239 --- /dev/null +++ b/.github/nv_compile.sh @@ -0,0 +1,41 @@ +#!/bin/bash + + +versvers=$(spcomp64 -v | grep "Compiler" --color=never | cut -d " " -f 3) + + +nv_plugs=("nativevotes") +nv_plugs+=("nativevotes.sp") +nv_plugs+=("nativevotes-basecommands.sp") +nv_plugs+=("nativevotes_mapchooser.sp") +nv_plugs+=("nativevotes_nominations.sp") +nv_plugs+=("nativevotes_rockthevote.sp") + +nv_plugins_disabled=("nativevotes_votetest.sp") +nv_plugins_disabled+=("nativevotes_votemanager_test.sp") +nv_plugins_disabled+=("csgo_votestart_test.sp") +nv_plugins_disabled+=("votedelay_changelevel.sp") +nv_plugins_disabled+=("votediagnostics.sp") +nv_plugins_disabled+=("votefailed.sp") + +# we start in git root +pushd ./addons/sourcemod/scripting + +mkdir ../plugins/disabled -p || true + + +for target in "${nv_plugs[@]}"; do + spcomp64 -i"./include/" "${target}" -o ../plugins/"${target}".smx +done + +for target in "${nv_plugins_disabled[@]}"; do + spcomp64 -i"./include/" "${target}" -o ../plugins/disabled/"${target}".smx +done + +popd + +mkdir build || true +7za a -r build/nativevotes_sm_"${versvers}".zip scripting/ translations/ plugins/ +rm plugins/ -rfv +ls -la + diff --git a/.github/workflows/nativevotes.yml b/.github/workflows/nativevotes.yml index c939c12..982d19e 100644 --- a/.github/workflows/nativevotes.yml +++ b/.github/workflows/nativevotes.yml @@ -8,7 +8,7 @@ on: jobs: run: name: Run action - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 # skip build on '[ci skip]' if: "!contains(github.event.head_commit.message, '[ci skip]')" @@ -18,35 +18,26 @@ jobs: with: submodules: true - - name: Setup SourcePawn Compiler + - name: Setup SourcePawn 1.10 Compiler uses: rumblefrog/setup-sp@master with: version: "1.10.x" - - name: Compile plugins + - name: Compile plugins 1.10 + shell: bash run: | - cd ./addons/sourcemod/scripting - pwd - mkdir ../plugins/disabled -p - spcomp -i"./include/" nativevotes.sp -o ../plugins/nativevotes.smx - spcomp -i"./include/" nativevotes-basecommands.sp -o ../plugins/nativevotes-basecommands.smx - spcomp -i"./include/" nativevotes_mapchooser.sp -o ../plugins/nativevotes_mapchooser.smx - spcomp -i"./include/" nativevotes_nominations.sp -o ../plugins/nativevotes_nominations.smx - spcomp -i"./include/" nativevotes_rockthevote.sp -o ../plugins/nativevotes_rockthevote.smx - spcomp -i"./include/" nativevotes_votetest.sp -o ../plugins/disabled/nativevotes_votetest.smx - spcomp -i"./include/" nativevotes_votemanager_test.sp -o ../plugins/disabled/nativevotes_votemanager_test.smx - spcomp -i"./include/" csgo_votestart_test.sp -o ../plugins/disabled/csgo_votestart_test.smx - spcomp -i"./include/" votedelay_changelevel.sp -o ../plugins/disabled/votedelay_changelevel.smx - spcomp -i"./include/" votediagnostics.sp -o ../plugins/disabled/votediagnostics.smx - spcomp -i"./include/" votefailed.sp -o ../plugins/disabled/votefailed.smx - ls -la + bash .github/nv_compile.sh - - name: Zip package + - name: Setup SourcePawn 1.11 Compiler + uses: rumblefrog/setup-sp@master + with: + version: "1.11.x" + + - name: Compile plugins 1.11 + shell: bash run: | - mkdir build - 7za a -r build/nativevotes.zip scripting/ plugins/ translations/ - ls -la - pwd + bash .github/nv_compile.sh + bash - name: Set Commit Hash id: commit_info @@ -63,14 +54,8 @@ jobs: draft: false prerelease: false - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Release + uses: softprops/action-gh-release@v1 with: - # 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 - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./build/nativevotes.zip - asset_name: nativevotes.zip - asset_content_type: application/zip + tag_name: workflow-build${{ github.run_number }} + files: build/nativevotes* \ No newline at end of file