Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

Commit 1881e68

Browse files
committed
Add nightly build action.
1 parent e337787 commit 1881e68

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/nightly.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Nightly Build
2+
3+
on:
4+
schedule:
5+
- cron: "0 */4 * * *"
6+
workflow_dispatch:
7+
8+
defaults:
9+
run:
10+
shell: pwsh
11+
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
permissions:
16+
contents: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
submodules: 'true'
21+
22+
- name: Setup MSBuild
23+
uses: microsoft/setup-msbuild@v2
24+
25+
- run: msbuild ${{ github.event.repository.name }}.sln -t:rebuild -verbosity:diag -property:Configuration=Release -property:Platform=x64
26+
- run: cp x64\Release\${{ github.event.repository.name }}.asi ${{ github.event.repository.name }}.asi
27+
28+
- uses: robinraju/[email protected]
29+
with:
30+
repository: "ThirteenAG/Ultimate-ASI-Loader"
31+
latest: true
32+
fileName: "Ultimate-ASI-Loader_x64.zip"
33+
34+
- name: Prepare Ultimate ASI Loader
35+
run: |
36+
unzip Ultimate-ASI-Loader_x64.zip -d .\
37+
C:\msys64\usr\bin\wget.exe -O .\UltimateASILoader_LICENSE.md https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/master/license
38+
39+
- name: Create Directory Structure
40+
run: mkdir .\zip\End\Binaries\Win64
41+
42+
- name: Prepare Release Files
43+
run: |
44+
cp ${{ github.event.repository.name }}.asi .\zip\End\Binaries\Win64
45+
cp ${{ github.event.repository.name }}.ini .\zip\End\Binaries\Win64
46+
cp dinput8.dll .\zip\End\Binaries\Win64\dsound.dll
47+
cp UltimateASILoader_LICENSE.md .\zip\End\Binaries\Win64\
48+
New-Item -Path ".\zip\EXTRACT_TO_GAME_FOLDER" -ItemType File
49+
50+
- name: Create Release Zip
51+
run: |
52+
cd .\zip
53+
Compress-Archive -Path .\* -DestinationPath ..\${{ github.event.repository.name }}_nightly.zip
54+
55+
- name: Generate Changelog from Last 48 Hours
56+
run: |
57+
$since = (Get-Date).AddDays(-2).ToString("yyyy-MM-ddTHH:mm:ssZ")
58+
$changelog = git log --since="$since" --pretty=format:"- %s (%h)" | Out-String
59+
if (-not $changelog) { $changelog = "No new commits in the last 48 hours." }
60+
"### Latest Commits in Last 48 Hours`n$changelog" | Set-Content release_body.md
61+
62+
- uses: ncipollo/release-action@v1
63+
with:
64+
artifacts: "${{ github.event.repository.name }}_nightly.zip"
65+
token: ${{ secrets.GITHUB_TOKEN }}
66+
tag: "nightly"
67+
name: "Nightly Build"
68+
prerelease: true
69+
bodyFile: "release_body.md"
70+
generateReleaseNotes: false
71+
artifactErrorsFailBuild: true
72+
allowUpdates: true

0 commit comments

Comments
 (0)