Skip to content

use original dir relative for clean dir #755

use original dir relative for clean dir

use original dir relative for clean dir #755

Workflow file for this run

name: Build - Linux
on:
push:
branches:
- "*"
- "release/*"
jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.REPO_TOKEN }}
submodules: recursive
- name: Setup ccache
id: setup-ccache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.ccache
key: ${{ runner.os }}-ccache-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-${{ github.ref_name }}-
${{ runner.os }}-ccache-${{ github.base_ref }}-
${{ runner.os }}-ccache-tc2-mod-
- name: Build dist
id: build-dist
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESSLEVEL: 6
run: |
mkdir -p $CCACHE_DIR
./src/buildallprojects
./game_clean/copy.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: game
path: |
game_dist
- name: Archive debug info
uses: actions/upload-artifact@v4
with:
name: game-debug-info
path: |
game_dist_debug
- name: Package Release
id: package-rel
if: ${{ (github.repository_owner == 'mastercomfig' || github.repository_owner == 'mastercoms') && github.event_name == 'push' && (github.ref == 'refs/heads/tc2-mod' || startsWith(github.ref, 'refs/heads/release/')) }}
run: |
rm -rf game_dist_debug
(cd game_dist && 7z a -r ../game-linux.zip '*')
shell: bash
- name: Push Release
id: create-rel
if: ${{ (github.repository_owner == 'mastercomfig' || github.repository_owner == 'mastercoms') && github.event_name == 'push' && (github.ref == 'refs/heads/tc2-mod' || startsWith(github.ref, 'refs/heads/release/')) }}
run: |
./game_clean/tag.sh
rm game-linux.zip
shell: bash
env:
GH_TOKEN: ${{secrets.REPO_TOKEN}}
- name: Cleanup
id: cleanup
run: |
rm -rf game_dist
git clean -xfd -- game src