mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-14 07:29:12 +08:00
4f32d23c30
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
91 lines
2.1 KiB
YAML
91 lines
2.1 KiB
YAML
#---------------------------------#
|
|
# 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" ]
|
|
tags:
|
|
- "v*"
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
#---------------------------------#
|
|
# environment configuration #
|
|
#---------------------------------#
|
|
|
|
env:
|
|
# Path to the root of the Cmder project.
|
|
CMDER_ROOT: ${{ github.workspace }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
jobs:
|
|
|
|
build:
|
|
name: Build Project
|
|
runs-on: windows-latest
|
|
permissions:
|
|
contents: write
|
|
discussions: write
|
|
steps:
|
|
- name: Check out repository code (Action from GitHub)
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Add MSBuild to PATH
|
|
uses: microsoft/setup-msbuild@v1
|
|
|
|
- name: Build Cmder Launcher
|
|
shell: pwsh
|
|
working-directory: scripts
|
|
run: .\build.ps1 -Compile -verbose
|
|
|
|
- name: Pack the built files
|
|
shell: pwsh
|
|
working-directory: scripts
|
|
run: .\pack.ps1 -verbose
|
|
|
|
- name: Upload artifact (cmder.zip)
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: build/cmder.zip
|
|
name: cmder.zip
|
|
if-no-files-found: error
|
|
|
|
- name: Upload artifact (cmder.7z)
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: build/cmder.7z
|
|
name: cmder.7z
|
|
|
|
- name: Upload artifact (cmder_mini.zip)
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: build/cmder_mini.zip
|
|
name: cmder_mini.zip
|
|
|
|
- name: Upload artifact (hashes.txt)
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: build/hashes.txt
|
|
name: hashes.txt
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
build/cmder.zip
|
|
build/cmder.7z
|
|
build/cmder_mini.zip
|
|
build/hashes.txt
|
|
draft: true
|
|
generate_release_notes: true
|
|
if: startsWith(github.ref, 'refs/tags/')
|