-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (48 loc) · 1.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
name: Build Dev
on:
workflow_dispatch:
push:
paths-ignore:
- '.github/*'
- '*.md'
pull_request:
paths-ignore:
- '.github/*'
- '*.md'
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate version based on current date and time
id: generate_version
shell: pwsh
run: |
Set-TimeZone -Id "China Standard Time" -PassThru
$date = Get-Date
$year = $date.Year.ToString().Substring(2)
$month = $date.Month.ToString("0")
$day = $date.Day.ToString("0")
$hour = $date.Hour.ToString("0")
$minute = $date.Minute.ToString("0")
$version = "$year.$month.$day.$hour$minute"
echo "Version: $version"
echo $PSVersionTable
echo $GITHUB_OUTPUT
echo "version=$version" >> $env:GITHUB_OUTPUT
# - name: Install NSIS
# uses: repolevedavaj/[email protected]
# with:
# nsis-version: 3.09
- name: Build XROSC
shell: cmd
env:
GITHUB_WORKFLOW_VERSION: ${{ steps.generate_version.outputs.version }}
run: |
cmd /c build.bat
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: XRSYS_OSC_CI_Build_v${{ steps.generate_version.outputs.version }}
path: osc.exe