Bump metcalfc/changelog-generator from 4.1.0 to 4.2.0 #1051
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: Build Get5 | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
testbuild: | |
name: Test Compile On Pull Request | |
runs-on: ubuntu-22.04 | |
env: | |
OUTPUT_PATH: output/get5 | |
OUTPUT_SM_PATH: output/get5/addons/sourcemod | |
SM_JSON_INC_PATH: get5/dependencies/sm-json/addons/sourcemod/scripting/include | |
STEAMWORKS_URL: https://raw.githubusercontent.com/hexa-core-eu/SteamWorks/main/Pawn/includes/SteamWorks.inc | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: 'get5' | |
submodules: true | |
- uses: rumblefrog/setup-sp@master | |
with: | |
version: '1.11.x' | |
- name: Get shorthand commit. | |
id: vars | |
run: | | |
sha_short=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7) | |
get5_version=$(cat get5/scripting/get5/version.sp | grep -Eo '#define PLUGIN_VERSION "[0-9]+\.[0-9]+\.[0-9]+' | sed 's/#define PLUGIN_VERSION "//') | |
echo "sha_short=${sha_short}" >> $GITHUB_ENV | |
echo "get5_version=${get5_version}" >> $GITHUB_ENV | |
echo "get5_build_filename=get5-v${get5_version}-${sha_short}" >> $GITHUB_ENV | |
- run: | | |
wget $STEAMWORKS_URL -P steamworks | |
mkdir -p $OUTPUT_SM_PATH/plugins/disabled | |
sed -i -r "s#\#define PLUGIN_VERSION \"[0-9]+\.[0-9]+\.[0-9]+-[a-zA-Z]+#\#define PLUGIN_VERSION \"${{ env.get5_version }}-${{ env.sha_short }}#g" get5/scripting/get5/version.sp | |
cp -R get5/cfg $OUTPUT_PATH | |
cp -R get5/translations $OUTPUT_SM_PATH | |
cp -R get5/configs $OUTPUT_SM_PATH | |
cp -R get5/scripting $OUTPUT_SM_PATH | |
cp get5/README.md $OUTPUT_PATH | |
cp get5/LICENSE $OUTPUT_PATH | |
spcomp get5/scripting/get5.sp -i steamworks -i $SM_JSON_INC_PATH -o $OUTPUT_SM_PATH/plugins/get5.smx -E | |
spcomp get5/scripting/get5_apistats.sp -i steamworks -i $SM_JSON_INC_PATH -o $OUTPUT_SM_PATH/plugins/disabled/get5_apistats.smx -E | |
spcomp get5/scripting/get5_mysqlstats.sp -i steamworks -i $SM_JSON_INC_PATH -o $OUTPUT_SM_PATH/plugins/disabled/get5_mysqlstats.smx -E | |
mkdir -p artifacts | |
cd $OUTPUT_PATH/ && tar -zcvf ../../artifacts/${{ env.get5_build_filename }}.tar.gz * && cd ../../ | |
cd $OUTPUT_PATH/ && zip -r ../../artifacts/${{ env.get5_build_filename }}.zip . && cd ../../ | |
- name: Upload PR build output | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.get5_build_filename }} | |
path: artifacts |