2022-10-15 01:45:46 +08:00
|
|
|
#---------------------------------#
|
|
|
|
# general configuration #
|
|
|
|
#---------------------------------#
|
|
|
|
|
|
|
|
name: Build Cmder
|
|
|
|
|
|
|
|
# Controls when the action will run. Triggers the workflow on push or pull request events but only for the main branch
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "master" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "master" ]
|
|
|
|
|
|
|
|
#---------------------------------#
|
|
|
|
# environment configuration #
|
|
|
|
#---------------------------------#
|
|
|
|
|
|
|
|
env:
|
|
|
|
# Path to the root of the Cmder project.
|
2022-10-15 02:26:19 +08:00
|
|
|
CMDER_ROOT: ${{ github.workspace }}
|
2022-10-15 01:45:46 +08:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
2022-10-15 01:55:15 +08:00
|
|
|
name: Build Project
|
2022-10-15 01:45:46 +08:00
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out repository code (Action from GitHub)
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Add MSBuild to PATH
|
2022-10-15 01:55:15 +08:00
|
|
|
uses: microsoft/setup-msbuild@v1
|
2022-10-15 01:45:46 +08:00
|
|
|
|
|
|
|
- name: Build Cmder Launcher
|
|
|
|
shell: pwsh
|
|
|
|
working-directory: scripts
|
|
|
|
run: .\build.ps1 -Compile -verbose
|
|
|
|
|
2022-10-15 02:18:40 +08:00
|
|
|
- name: Pack the built files
|
2022-10-15 01:45:46 +08:00
|
|
|
shell: pwsh
|
|
|
|
working-directory: scripts
|
|
|
|
run: .\pack.ps1 -verbose
|
|
|
|
|
2022-10-15 06:38:52 +08:00
|
|
|
- name: Upload artifacts
|
2022-10-15 01:45:46 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-10-15 06:38:52 +08:00
|
|
|
path: build
|
2022-10-15 01:45:46 +08:00
|
|
|
if-no-files-found: error
|