Update for TF2 version 8308684 (2023-09-01) #68
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 Workflow | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
run: | |
name: Run action | |
runs-on: ubuntu-20.04 | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: Setup SourcePawn Compiler | |
uses: rumblefrog/[email protected] | |
with: | |
version: "1.10.x" | |
- name: Setup Ninja Build | |
uses: ashutoshvarma/setup-ninja@master | |
with: | |
version: 1.10.0 | |
- name: Build Files | |
run: | | |
python3 configure.py | |
ninja | |
- name: Build Package | |
# the package generation should probably be part of the ninja script itself | |
run: | | |
pushd build | |
7za a -r package.zip scripting/ plugins/ gamedata/ | |
popd | |
- name: Set commit hash | |
id: vars | |
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: workflow-build${{ github.run_number }} | |
release_name: Build ${{ steps.vars.outputs.sha_short }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./build/package.zip | |
asset_name: package.zip | |
asset_content_type: application/zip |