-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wrong version tag in version.sp on master Format .yml files
- Loading branch information
Showing
2 changed files
with
128 additions
and
127 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 |
---|---|---|
|
@@ -16,118 +16,119 @@ jobs: | |
SM_JSON_INC_PATH: get5/dependencies/sm-json/addons/sourcemod/scripting/include | ||
STEAMWORKS_URL: https://raw.githubusercontent.com/KyleSanderson/SteamWorks/1.2.3c/Pawn/includes/SteamWorks.inc | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: 'get5' | ||
submodules: true | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: 'get5' | ||
submodules: true | ||
|
||
- uses: rumblefrog/setup-sp@master | ||
with: | ||
version: '1.10.x' | ||
- uses: rumblefrog/setup-sp@master | ||
with: | ||
version: '1.10.x' | ||
|
||
- name: Get shorthand commit. | ||
id: vars | ||
run: | | ||
sha_short=$(echo ${{ github.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 "::set-output name=sha_short::${sha_short}" | ||
echo "::set-output name=get5_version::${get5_version}" | ||
if [ ${{ github.ref }} == 'refs/heads/master' ] | ||
then | ||
echo "::set-output name=get5_build_filename::get5-v${get5_version}" | ||
else | ||
echo "::set-output name=get5_build_filename::get5-v${get5_version}-${sha_short}" | ||
fi | ||
- name: Get shorthand commit. | ||
id: vars | ||
run: | | ||
sha_short=$(echo ${{ github.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 "::set-output name=sha_short::${sha_short}" | ||
echo "::set-output name=get5_version::${get5_version}" | ||
if [ ${{ github.ref }} == 'refs/heads/master' ] | ||
then | ||
echo "::set-output name=get5_build_filename::get5-v${get5_version}" | ||
echo "::set-output name=get5_version_sp_tag::${get5_version}" | ||
else | ||
echo "::set-output name=get5_build_filename::get5-v${get5_version}-${sha_short}" | ||
echo "::set-output name=get5_version_sp_tag::${get5_version}-${sha_short}" | ||
fi | ||
- 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 \"${{ steps.vars.outputs.get5_version }}-${{ steps.vars.outputs.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/${{ steps.vars.outputs.get5_build_filename }}.tar.gz . && cd ../../ | ||
cd $OUTPUT_PATH/ && zip -r ../../artifacts/${{ steps.vars.outputs.get5_build_filename }}.zip . && cd ../../ | ||
- 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 \"${{ steps.vars.outputs.get5_version_sp_tag }}#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/${{ steps.vars.outputs.get5_build_filename }}.tar.gz * && cd ../../ | ||
cd $OUTPUT_PATH/ && zip -r ../../artifacts/${{ steps.vars.outputs.get5_build_filename }}.zip . && cd ../../ | ||
- name: Store Artifacts For Tagging Release Or Nightly | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.vars.outputs.get5_build_filename }} | ||
path: artifacts | ||
- name: Store Artifacts For Tagging Release Or Nightly | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.vars.outputs.get5_build_filename }} | ||
path: artifacts | ||
outputs: | ||
get5-version: ${{ steps.vars.outputs.get5_version }} | ||
sha-short: ${{ steps.vars.outputs.sha_short }} | ||
filename: ${{ steps.vars.outputs.get5_build_filename }} | ||
|
||
deploy-nightly: | ||
needs: [build] | ||
needs: [ build ] | ||
name: Upload And Create Nightly Tag | ||
if: github.ref == 'refs/heads/development' | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ needs.build.outputs.filename }} | ||
path: artifacts | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ needs.build.outputs.filename }} | ||
path: artifacts | ||
|
||
- name: Generate changelog | ||
id: changelog | ||
uses: metcalfc/[email protected] | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Generate changelog | ||
id: changelog | ||
uses: metcalfc/[email protected] | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Tag And Attach Nightly Build | ||
uses: ncipollo/[email protected] | ||
with: | ||
token: "${{ secrets.GITHUB_TOKEN }}" | ||
artifacts: "artifacts/${{ needs.build.outputs.filename }}.zip,artifacts/${{ needs.build.outputs.filename }}.tar.gz" | ||
prerelease: true | ||
commit: "${{ github.sha }}" | ||
tag: "v${{ needs.build.outputs.get5-version }}-${{ needs.build.outputs.sha-short }}" | ||
name: "Nightly ${{ needs.build.outputs.get5-version }}-${{ needs.build.outputs.sha-short }}" | ||
body: | | ||
Please note while these are compiled nightly builds, bugs may still exist in the software. | ||
When reporting an issue, please include the debug log by calling `get5_debuginfo` and attach | ||
the file located at addons/sourcemod/logs/get5_debuginfo.txt. | ||
This will help speed up the process of tracking down bugs based | ||
on that specific version. | ||
${{ steps.changelog.outputs.changelog }} | ||
- name: Tag And Attach Nightly Build | ||
uses: ncipollo/[email protected] | ||
with: | ||
token: "${{ secrets.GITHUB_TOKEN }}" | ||
artifacts: "artifacts/${{ needs.build.outputs.filename }}.zip,artifacts/${{ needs.build.outputs.filename }}.tar.gz" | ||
prerelease: true | ||
commit: "${{ github.sha }}" | ||
tag: "v${{ needs.build.outputs.get5-version }}-${{ needs.build.outputs.sha-short }}" | ||
name: "Nightly ${{ needs.build.outputs.get5-version }}-${{ needs.build.outputs.sha-short }}" | ||
body: | | ||
Please note while these are compiled nightly builds, bugs may still exist in the software. | ||
When reporting an issue, please include the debug log by calling `get5_debuginfo` and attach | ||
the file located at `addons/sourcemod/logs/get5_debuginfo.txt`. This will help speed up the process of | ||
tracking down bugs based on that specific version. | ||
${{ steps.changelog.outputs.changelog }} | ||
deploy-stable: | ||
needs: [build] | ||
needs: [ build ] | ||
name: Upload Artifacts and Draft Full Release. | ||
if: github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Generate changelog | ||
id: changelog | ||
uses: metcalfc/[email protected] | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Generate changelog | ||
id: changelog | ||
uses: metcalfc/[email protected] | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ needs.build.outputs.filename }} | ||
path: artifacts | ||
- name: Tag And Draft Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
token: "${{ secrets.GITHUB_TOKEN }}" | ||
artifacts: "artifacts/${{ needs.build.outputs.filename }}.zip,artifacts/${{ needs.build.outputs.filename }}.tar.gz" | ||
draft: true | ||
commit: "${{ github.sha }}" | ||
tag: "v${{ needs.build.outputs.get5-version }}" | ||
name: "Version ${{ needs.build.outputs.get5-version }}" | ||
body: | | ||
${{ steps.changelog.outputs.changelog }} | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ needs.build.outputs.filename }} | ||
path: artifacts | ||
|
||
- name: Tag And Draft Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
token: "${{ secrets.GITHUB_TOKEN }}" | ||
artifacts: "artifacts/${{ needs.build.outputs.filename }}.zip,artifacts/${{ needs.build.outputs.filename }}.tar.gz" | ||
draft: true | ||
commit: "${{ github.sha }}" | ||
tag: "v${{ needs.build.outputs.get5-version }}" | ||
name: "Version ${{ needs.build.outputs.get5-version }}" | ||
body: | | ||
${{ steps.changelog.outputs.changelog }} |
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