Update nightly.yml #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |