Skip to content

update(workflows): Use Github PAT #50

update(workflows): Use Github PAT

update(workflows): Use Github PAT #50

Workflow file for this run

name: "Swiftly Compiler"
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
env:
MMSOURCE112: ${{ github.workspace }}/swiftly/metamod
HL2SDKCS2: ${{ github.workspace }}/swiftly/hl2sdk
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
os: [self-hosted, windows-hosted]
include:
- os: self-hosted
container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: swiftly
submodules: recursive
- name: Checkout AMBuild
uses: actions/checkout@v4
with:
repository: alliedmodders/ambuild
path: ambuild
- name: Install AMBuild
run: |
cd ambuild; python setup.py install; cd ..
- name: Download Swiftly Plugin Utilities - Windows
uses: bettermarks/[email protected]
if: matrix.os == 'windows-hosted'
with:
repo: swiftly-solution/swiftly-plugins-utility
token: ${{ secrets.GITHUB_TOKEN }}
artifact_name: Swiftly Plugins Utility Windows
rename: plugin_files/scripting/swiftly_utility.exe
wait_seconds: 60
- name: Download Swiftly Plugin Utilities - Linux
uses: bettermarks/[email protected]
if: matrix.os == 'self-hosted'
with:
repo: swiftly-solution/swiftly-plugins-utility
token: ${{ secrets.GITHUB_TOKEN }}
artifact_name: Swiftly Plugins Utility Linux
rename: plugin_files/scripting/swiftly_utility
wait_seconds: 60
- name: Prepare Build - Linux
if: matrix.os == 'self-hosted'
working-directory: swiftly
shell: bash
run: |
bash ./setup.sh
- name: Prepare Build - Windows
if: matrix.os == 'windows-hosted'
working-directory: swiftly
run: |
./setup.ps1
- name: Build
working-directory: swiftly
run: |
cd build
ambuild
- name: Upload Artifacts Linux
if: matrix.os == 'self-hosted'
uses: actions/upload-artifact@v3
with:
name: Swiftly Plugin Linux
path: ${{ github.workspace }}/swiftly/build/package
- name: Upload Artifacts Windows
if: matrix.os == 'windows-hosted'
uses: actions/upload-artifact@v3
with:
name: Swiftly Plugin Windows
path: ${{ github.workspace }}/swiftly/build/package