Skip to content

Build

Build #360

Workflow file for this run

name: Build
on:
push:
paths:
- "src/**"
- "premake5.lua"
- ".github/workflows/build.yml"
pull_request:
paths:
- "src/**"
workflow_dispatch:
inputs:
release:
description: "Release after build"
required: true
type: boolean
jobs:
build:
name: ACTS (Windows)
runs-on: windows-latest
strategy:
matrix:
cfg:
- Release
- Debug
platform:
- x64
steps:
- uses: actions/checkout@v3.5.3
with:
submodules: true
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.3.1
with:
msbuild-architecture: x64
- name: Get version
id: get_version
shell: pwsh
run: "\"version=$(scripts/getversion.ps1)\" | Out-File $env:GITHUB_OUTPUT"
- name: Version
run: "\"version: ${{ steps.get_version.outputs.version }}\""
- name: Setup premake5
uses: abel0b/setup-premake@v2.3
with:
version: "5.0.0-beta2"
- name: Create project
shell: pwsh
run: scripts/setup.ps1 -ci
- name: Build project
shell: pwsh
run: msbuild build/AtianCodTools.sln /p:Configuration=${{matrix.cfg}} /p:Platform=${{matrix.platform}}
- name: Package project
if: matrix.cfg == 'Release'
shell: pwsh
run: scripts/package.ps1
- name: Upload dev release
uses: ncipollo/release-action@v1
if: matrix.cfg == 'Release' && github.ref == 'refs/heads/main'
with:
commit: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: "latest_build"
artifacts: "build/package/acts.zip,build/package/acts-dev.zip"
artifactErrorsFailBuild: true
makeLatest: false
removeArtifacts: true
replacesArtifacts: true
allowUpdates: true
name: "Dev build ${{ steps.get_version.outputs.version }}"
body: "Latest dev build, [get the latest release build here](https://github.com/${{ github.repository }}/releases/latest)."
- name: Upload release
if: inputs.release && matrix.cfg == 'Release' && github.ref == 'refs/heads/main'
uses: ncipollo/release-action@v1
with:
commit: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "build/package/acts.zip,build/package/acts-dev.zip"
artifactErrorsFailBuild: true
makeLatest: true
tag: "${{ steps.get_version.outputs.version }}"
name: "${{ steps.get_version.outputs.version }}"
bodyFile: release/RELEASE.MD