Add chat visuals config (#24) #6
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
name: Compile and release | |
on: | |
push: | |
branches: | |
master | |
env: | |
PLUGIN_NAME: chaos | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
sm-version: [ '1.12.x' ] | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set environment variables | |
run: echo SCRIPTS_PATH=$(pwd) >> $GITHUB_ENV | |
- name: Download includes | |
run: | | |
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/FlaminSarge/tf2attributes/master/scripting/include/tf2attributes.inc | |
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/asherkin/TF2Items/master/pawn/tf2items.inc | |
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/nosoop/SM-TFUtils/master/scripting/include/tf2utils.inc | |
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/nosoop/SM-TFEconData/master/scripting/include/tf_econ_data.inc | |
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/FortyTwoFortyTwo/VScript/main/scripting/include/vscript.inc | |
wget -P ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting/include https://raw.githubusercontent.com/DoctorMcKay/sourcemod-plugins/master/scripting/include/morecolors.inc | |
- name: Setup SourcePawn Compiler ${{ matrix.sm-version }} | |
id: setup_sp | |
uses: rumblefrog/setup-sp@master | |
with: | |
version: ${{ matrix.sm-version }} | |
version-file: ./addons/sourcemod/scripting/${{ env.PLUGIN_NAME }}.sp | |
define-name: "PLUGIN_VERSION" | |
- name: Compile plugins | |
run: | | |
mkdir ../plugins | |
spcomp -v2 -E -i "include" -o"../plugins/${{ env.PLUGIN_NAME }}.smx" ${{ env.PLUGIN_NAME }}.sp | |
echo "===OUT FILES===" | |
ls ../plugins | |
echo "===VERSION===" | |
echo ${{ steps.setup_sp.outputs.plugin-version }} | |
working-directory: ${{ env.SCRIPTS_PATH }}/addons/sourcemod/scripting | |
- name: Install zip | |
uses: montudor/action-zip@v1 | |
- name: Zip output | |
run: | | |
zip -qq -y -r ${{ github.event.repository.name }}.zip addons scripts | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
- name: List files in the directory | |
run: ls -R | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
- name: List files in the zip | |
run: unzip -l ${{ github.event.repository.name }}.zip | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.setup_sp.outputs.plugin-version }} | |
artifacts: "addons/sourcemod/${{ github.event.repository.name }}.zip" | |
draft: true | |
allowUpdates: true | |
updateOnlyUnreleased: true | |
skipIfReleaseExists: true |