cmder/.github/workflows/build.yml

91 lines
2.1 KiB
YAML
Raw Normal View History

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" ]
tags:
- "v*"
2022-10-14 21:15:46 +03:30
pull_request:
branches: [ "master" ]
#---------------------------------#
# environment configuration #
#---------------------------------#
env:
# Path to the root of the Cmder project.
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)
uses: actions/checkout@v3
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
2022-10-14 21:25:15 +03:30
uses: microsoft/setup-msbuild@v1
2022-10-14 21:15:46 +03:30
- name: Build Cmder Launcher
shell: pwsh
working-directory: scripts
run: .\build.ps1 -Compile -verbose
2022-10-14 21:48:40 +03:30
- name: Pack the built files
2022-10-14 21:15:46 +03:30
shell: pwsh
working-directory: scripts
run: .\pack.ps1 -verbose
2022-10-15 02:30:45 +03:30
- name: Upload artifact (cmder.zip)
2022-10-14 21:15:46 +03:30
uses: actions/upload-artifact@v3
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)
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/')