-
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 2.69 KB
/
nightly.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
name: Build Nightly
on:
push:
branches: [ "dev" ]
# pull_request:
# branches: [ "dev" ]
jobs:
build:
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
env:
Project_Name: LegendUtil
Produire_Url: https://produ.irelang.jp/downloads/2.0/produire-2.0.1191.zip
steps:
- name: Create Directory
run: |
New-Item -ItemType Directory "$env:RUNNER_TEMP\rdr"
New-Item -ItemType Directory "$env:RUNNER_TEMP\source"
New-Item -ItemType Directory "$env:RUNNER_TEMP\build"
New-Item -ItemType Directory "\artifacts"
- name: Download Produire
shell: pwsh
run: |
Invoke-WebRequest -Uri $env:Produire_Url -OutFile "$env:RUNNER_TEMP\rdr.zip"
$zipfilePath="$env:RUNNER_TEMP\rdr.zip"
$destinationUnzipPath="$env:RUNNER_TEMP\rdr"
& ${env:ProgramFiles}\7-Zip\7z.exe x $zipfilePath "-o$($destinationUnzipPath)" -y
Remove-Item -Path "$env:RUNNER_TEMP\rdr.zip"
- name: Download Source
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://github.com/$env:GITHUB_REPOSITORY/archive/refs/heads/$env:GITHUB_REF_NAME.zip" -OutFile "$env:RUNNER_TEMP\source.zip"
$zipfilePath="$env:RUNNER_TEMP\source.zip"
$destinationUnzipPath="$env:RUNNER_TEMP\source"
& ${env:ProgramFiles}\7-Zip\7z.exe x $zipfilePath "-o$($destinationUnzipPath)" -y
Remove-Item -Path "$env:RUNNER_TEMP\source.zip"
- name: Compile Source
shell: pwsh
run: |
$Source_Path="$env:RUNNER_TEMP\source\$env:Project_Name-$env:GITHUB_REF_NAME"
"Nightly Build" > "$Source_Path\BuildDate.txt"
"99999.000000" > "$Source_Path\BuildVersion.txt"
Start-Process -Wait -NoNewWindow -FilePath "$env:RUNNER_TEMP\rdr\rdrc.exe" -ArgumentList "/desktop","/anycpu","$Source_Path\$env:Project_Name.rdrproj"
Move-Item -Path "$Source_Path\$env:Project_Name.exe" -Destination "$env:RUNNER_TEMP\build"
Move-Item -Path "$Source_Path\*.dll" -Destination "$env:RUNNER_TEMP\build"
- name: Copy Resources
shell: pwsh
run: |
$Source_Path="$env:RUNNER_TEMP\source\$env:Project_Name-$env:GITHUB_REF_NAME"
Copy-Item -Recurse -Path "$Source_Path\_Pack\$env:Project_Name\Resources" -Destination "$env:RUNNER_TEMP\build"
Copy-Item -Recurse -Path "$Source_Path\Source\runtimes" -Destination "$env:RUNNER_TEMP\build"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.Project_Name }}-${{ github.ref_name }}_Nightly_Build
path: ${{ runner.temp }}\build