Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
Disallow paths outside gamedir
Update PackageScript for multi-arch outputs
Bump version
  • Loading branch information
KitRifty committed Jan 2, 2024
1 parent 814168e commit 66f1ea9
Show file tree
Hide file tree
Showing 18 changed files with 1,027 additions and 757 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-2019]
os: [ubuntu-20.04, windows-2019]
include:
- os: ubuntu-18.04
target-archs: x86
- os: ubuntu-20.04
target-archs: x86,x86_64

- os: windows-2019
target-archs: x86
target-archs: x86,x86_64

env:
SOURCEMOD_VERSION: '1.11'

steps:
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Setup Python
with:
python-version: '3.10'
Expand All @@ -44,21 +44,21 @@ jobs:
sudo apt update
sudo apt install -yq --no-install-recommends g++-multilib
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Repository checkout
with:
fetch-depth: 0
path: extension

- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Checkout SourceMod
with:
repository: alliedmodders/sourcemod
ref: ${{ env.SOURCEMOD_VERSION }}-dev
submodules: recursive
path: sourcemod

- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Checkout AMBuild
with:
repository: alliedmodders/ambuild
Expand All @@ -78,15 +78,15 @@ jobs:
ambuild
- name: Upload artifact
if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main' && (startsWith(matrix.os, 'ubuntu-18.04') || startsWith(matrix.os, 'windows-2019'))
uses: actions/upload-artifact@v1
if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main' && (startsWith(matrix.os, 'ubuntu-20.04') || startsWith(matrix.os, 'windows-2019'))
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}
path: extension/build/package

- name: Upload artifact
if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main' && strategy.job-index == 0
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: versioning
path: extension/build/includes
Expand All @@ -99,7 +99,7 @@ jobs:

steps:
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4

- name: Set release version
run: |
Expand All @@ -108,15 +108,16 @@ jobs:
- name: Package
run: |
7z a sm-filewatcher-${{ env.GITHUB_RELEASE_TAG }}-linux.zip ./Linux/*
7z a sm-filewatcher-${{ env.GITHUB_RELEASE_TAG }}-windows.zip ./Windows/*
mkdir -p dist
7z a dist/sm-filewatcher-${{ env.GITHUB_RELEASE_TAG }}-linux.tar.gz ./Linux/*
7z a dist/sm-filewatcher-${{ env.GITHUB_RELEASE_TAG }}-windows.zip ./Windows/*
- name: Create release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.GITHUB_RELEASE_TAG }}
file: '*.zip'
file: 'dist/*'
file_glob: true
body: |
${{ github.event.head_commit.message }}
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "extension/tests/googletests"]
path = extension/tests/googletests
url = https://github.com/google/googletest
Loading

0 comments on commit 66f1ea9

Please sign in to comment.