-
Notifications
You must be signed in to change notification settings - Fork 2k
133 lines (112 loc) · 3.35 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#---------------------------------#
# 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", "development" ]
#---------------------------------#
# 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@v2
- name: Build Cmder Launcher
shell: pwsh
working-directory: scripts
run: .\build.ps1 -Compile -verbose -terminal all
- name: Pack the built files
shell: pwsh
working-directory: scripts
run: .\pack.ps1 -verbose -terminal all
- name: Upload artifact (cmder_win_mini.zip)
uses: actions/upload-artifact@v3
with:
path: build/cmder_win_mini.zip
name: cmder_win_mini.zip
if-no-files-found: error
- name: Upload artifact (cmder_win.7z)
uses: actions/upload-artifact@v3
with:
path: build/cmder_win.7z
name: cmder_win.7z
if-no-files-found: error
- name: Upload artifact (cmder_win.zip)
uses: actions/upload-artifact@v3
with:
path: build/cmder_win.zip
name: cmder_win.zip
if-no-files-found: error
- 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
- name: Upload artifact (cmder.zip)
uses: actions/upload-artifact@v4
with:
path: build/cmder.zip
name: cmder.zip
if-no-files-found: error
- name: Upload artifact (cmder.7z)
uses: actions/upload-artifact@v4
with:
path: build/cmder.7z
name: cmder.7z
- name: Upload artifact (cmder_mini.zip)
uses: actions/upload-artifact@v4
with:
path: build/cmder_mini.zip
name: cmder_mini.zip
- name: Upload artifact (hashes.txt)
uses: actions/upload-artifact@v4
with:
path: build/hashes.txt
name: hashes.txt
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
build/cmder.zip
build/cmder_wt.zip
build/cmder.7z
build/cmder_wt.7z
build/cmder_mini.zip
build/cmder_wt_mini.zip
build/hashes.txt
draft: true
generate_release_notes: true
if: startsWith(github.ref, 'refs/tags/')