Skip to content

Build Postcompiler

Build Postcompiler #72

name: Build Postcompiler
on:
schedule:
- cron: '14 9 * * TUE' # Run at 9:14 (7:14pm local) on Tuesday
create:
ref_type: 'tag'
workflow_dispatch:
# Allow triggering manually whenever it's useful.
inputs:
ref:
description: 'Branch/tag/commit to use'
required: true
type: string
default: 'dev'
permissions:
contents: read
pull-requests: read
jobs:
freeze:
strategy:
fail-fast: false
matrix:
include:
# We want 3.8 because it works on Windows 7.
- artifact-name: 'win32'
python-version: '3.8.10'
arch: 'x86'
os: 'windows-latest'
- artifact-name: 'win64'
python-version: '3.11'
arch: 'x64'
os: 'windows-latest'
- artifact-name: 'linux64'
python-version: '3.11'
arch: 'x64'
os: 'ubuntu-latest'
runs-on: ${{ matrix.os }}
name: Build postcompiler-${{ artifact-name }}

Check failure on line 40 in .github/workflows/build-postcompiler.yml

View workflow run for this annotation

GitHub Actions / Build Postcompiler

Invalid workflow file

The workflow is not valid. .github/workflows/build-postcompiler.yml (Line: 40, Col: 11): Unrecognized named-value: 'artifact-name'. Located at position 1 within expression: artifact-name
steps:
# Build dev on schedule, since it's actually changing.
- name: Checkout Dev
uses: actions/checkout@v4
if: github.event_name == 'schedule'
with:
ref: dev
# Always build the exact tag that's pushed.
- name: Checkout Tag
uses: actions/checkout@v4
if: github.event_name == 'create'
with:
ref: ${{ github.event.ref }}
- name: Checkout Ref
uses: actions/checkout@v4
if: github.event_name == 'workflow_dispatch'
with:
ref: ${{ inputs.ref }}
- name: Set up Python ${{ matrix.python-version }}-${{ matrix.arch }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.arch }}
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install srctools
run: |
python -m pip install -U setuptools pip wheel
python -m pip install -r requirements.txt
- name: Freeze application
run: python -m PyInstaller --distpath ../build/ -y ../postcompiler.spec
working-directory: ./src/
- name: Artifact upload (tag)
uses: actions/upload-artifact@v4
if: github.event_name == 'create'
with:
name: hammeraddons_${{ github.event.ref }}_${{ matrix.artifact-name }}
path: ./build/
if-no-files-found: error
- name: Artifact upload (hash)
uses: actions/upload-artifact@v4
if: github.event_name != 'create'
with:
name: hammeraddons_${{ github.sha }}_${{ matrix.artifact-name }}
path: ./build/
if-no-files-found: error