2022-10-14 21:15:46 +03:30
|
|
|
#---------------------------------#
|
|
|
|
# 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" ]
|
2022-12-21 18:08:49 +00:00
|
|
|
tags:
|
|
|
|
- "v*"
|
2022-10-14 21:15:46 +03:30
|
|
|
pull_request:
|
2024-01-02 12:04:31 -05:00
|
|
|
branches: [ "master", "development" ]
|
2022-10-14 21:15:46 +03:30
|
|
|
|
|
|
|
#---------------------------------#
|
|
|
|
# environment configuration #
|
|
|
|
#---------------------------------#
|
|
|
|
|
|
|
|
env:
|
|
|
|
# Path to the root of the Cmder project.
|
2022-10-14 21:56:19 +03:30
|
|
|
CMDER_ROOT: ${{ github.workspace }}
|
2022-10-14 21:15:46 +03:30
|
|
|
|
|
|
|
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-14 21:25:15 +03:30
|
|
|
name: Build Project
|
2022-10-14 21:15:46 +03:30
|
|
|
runs-on: windows-latest
|
2023-07-24 15:04:16 +01:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
discussions: write
|
2022-10-14 21:15:46 +03:30
|
|
|
steps:
|
|
|
|
- name: Check out repository code (Action from GitHub)
|
2023-09-04 15:47:52 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-10-15 04:31:56 +03:30
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-10-14 21:15:46 +03:30
|
|
|
|
|
|
|
- name: Add MSBuild to PATH
|
2024-02-06 19:43:29 +00:00
|
|
|
uses: microsoft/setup-msbuild@v2
|
2022-10-14 21:15:46 +03:30
|
|
|
|
|
|
|
- name: Build Cmder Launcher
|
|
|
|
shell: pwsh
|
|
|
|
working-directory: scripts
|
2023-11-23 07:10:59 -05:00
|
|
|
run: .\build.ps1 -Compile -verbose -terminal all
|
2022-10-14 21:15:46 +03:30
|
|
|
|
2023-09-25 16:12:52 -04:00
|
|
|
- name: Pack the built files
|
2022-10-14 21:15:46 +03:30
|
|
|
shell: pwsh
|
|
|
|
working-directory: scripts
|
2023-11-23 07:10:59 -05:00
|
|
|
run: .\pack.ps1 -verbose -terminal all
|
2023-09-25 15:59:10 -04:00
|
|
|
|
|
|
|
- name: Upload artifact (cmder_wt.zip)
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
path: build/cmder_wt.zip
|
|
|
|
name: cmder_wt.zip
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload artifact (cmder_wt.7z)
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
path: build/cmder_wt.7z
|
|
|
|
name: cmder_wt.7z
|
|
|
|
|
|
|
|
- name: Upload artifact (cmder_wt_mini.zip)
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
path: build/cmder_wt_mini.zip
|
|
|
|
name: cmder_wt_mini.zip
|
2022-10-14 21:15:46 +03:30
|
|
|
|
2022-10-15 02:30:45 +03:30
|
|
|
- name: Upload artifact (cmder.zip)
|
2024-01-03 00:54:57 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-10-14 21:15:46 +03:30
|
|
|
with:
|
2022-10-15 02:30:45 +03:30
|
|
|
path: build/cmder.zip
|
|
|
|
name: cmder.zip
|
2022-10-14 21:15:46 +03:30
|
|
|
if-no-files-found: error
|
2022-10-15 02:30:45 +03:30
|
|
|
|
|
|
|
- name: Upload artifact (cmder.7z)
|
2024-01-03 00:54:57 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-10-15 02:30:45 +03:30
|
|
|
with:
|
|
|
|
path: build/cmder.7z
|
|
|
|
name: cmder.7z
|
|
|
|
|
|
|
|
- name: Upload artifact (cmder_mini.zip)
|
2024-01-03 00:54:57 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-10-15 02:30:45 +03:30
|
|
|
with:
|
|
|
|
path: build/cmder_mini.zip
|
|
|
|
name: cmder_mini.zip
|
|
|
|
|
|
|
|
- name: Upload artifact (hashes.txt)
|
2024-01-03 00:54:57 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-10-15 02:30:45 +03:30
|
|
|
with:
|
|
|
|
path: build/hashes.txt
|
|
|
|
name: hashes.txt
|
2022-12-21 18:08:49 +00:00
|
|
|
|
|
|
|
- name: Create Release
|
2024-03-11 15:59:16 +00:00
|
|
|
uses: softprops/action-gh-release@v2
|
2022-12-21 18:08:49 +00:00
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
build/cmder.zip
|
2023-09-25 15:59:10 -04:00
|
|
|
build/cmder_wt.zip
|
2022-12-21 18:08:49 +00:00
|
|
|
build/cmder.7z
|
2023-09-25 15:59:10 -04:00
|
|
|
build/cmder_wt.7z
|
2022-12-21 18:08:49 +00:00
|
|
|
build/cmder_mini.zip
|
2023-09-25 15:59:10 -04:00
|
|
|
build/cmder_wt_mini.zip
|
2022-12-21 18:08:49 +00:00
|
|
|
build/hashes.txt
|
|
|
|
draft: true
|
|
|
|
generate_release_notes: true
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|