diff --git a/.gitea/workflows/unreal-build.yml b/.gitea/workflows/unreal-build.yml
index 0ea0dd63..ef2d15fd 100644
--- a/.gitea/workflows/unreal-build.yml
+++ b/.gitea/workflows/unreal-build.yml
@@ -31,13 +31,13 @@ jobs:
- name: Build for Windows
run: |
- chmod +x ./win_build.sh
- ./win_build.sh
+ # Chmod command doesn't exist in Windows, use PowerShell to run the bash script
+ & 'C:\Program Files\Git\bin\bash.exe' -c "./win_build.sh"
- name: Build for Linux
run: |
- chmod +x ./linux_build.sh
- ./linux_build.sh
+ # Chmod command doesn't exist in Windows, use PowerShell to run the bash script
+ & 'C:\Program Files\Git\bin\bash.exe' -c "./linux_build.sh"
- name: Package builds
run: |
@@ -58,6 +58,22 @@ jobs:
echo "=== Packaged releases ==="
ls -la PackagedReleases/
+ - name: Upload Windows Build Artifact
+ uses: actions/upload-artifact@v3
+ if: success() && hashFiles('PackagedReleases/LuckyRobots-Windows.zip') != ''
+ with:
+ name: LuckyRobots-Windows
+ path: PackagedReleases/LuckyRobots-Windows.zip
+ retention-days: 14
+
+ - name: Upload Linux Build Artifact
+ uses: actions/upload-artifact@v3
+ if: success() && hashFiles('PackagedReleases/LuckyRobots-Linux.zip') != ''
+ with:
+ name: LuckyRobots-Linux
+ path: PackagedReleases/LuckyRobots-Linux.zip
+ retention-days: 14
+
- name: Create Tag
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
run: |
@@ -117,21 +133,96 @@ jobs:
fi
echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV
+ - name: Create Build Info
+ run: |
+ # Create a build info JSON file
+ echo '{
+ "version": "${{ env.RELEASE_TAG }}",
+ "buildNumber": "${{ github.run_number }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}",
+ "buildDate": "'$(date -u +"%Y-%m-%dT%H:%M:%SZ")'",
+ "artifacts": {
+ "windows": "https://luckyrobots.com/luckyrobots/luckyworld/actions/runs/${{ github.run_id }}/artifacts/LuckyRobots-Windows",
+ "linux": "https://luckyrobots.com/luckyrobots/luckyworld/actions/runs/${{ github.run_id }}/artifacts/LuckyRobots-Linux"
+ }
+ }' > PackagedReleases/build-info.json
+
+ # Create a simple HTML download page
+ echo '
+
+
+
+
+ LuckyRobots ${{ env.RELEASE_TAG }} Downloads
+
+
+
+ LuckyRobots Game - ${{ env.RELEASE_TAG }}
+ Build #${{ github.run_number }} - Built from commit: ${{ github.sha }}
+
+
+
+
+
+
+
+
+
+ ' > PackagedReleases/downloads.html
+
- name: Create Release
uses: https://gitea.com/actions/gitea-release-action@main
with:
files: |-
- PackagedReleases/*.zip
+ PackagedReleases/build-info.json
+ PackagedReleases/downloads.html
token: '${{ secrets.GITEA_TOKEN }}'
title: 'Release ${{ env.RELEASE_TAG }}'
body: |
- ## Automated release from CI build #${{ github.run_number }}
+ ## LuckyRobots Game Release ${{ env.RELEASE_TAG }}
- This release includes builds for:
- - Windows
- - Linux
+ ### Download Links
- Built from commit: ${{ github.sha }}
+ Download builds from our CI artifacts:
+
+ - [Windows Build](https://luckyrobots.com/luckyrobots/luckyworld/actions/runs/${{ github.run_id }}/artifacts/LuckyRobots-Windows)
+ - [Linux Build](https://luckyrobots.com/luckyrobots/luckyworld/actions/runs/${{ github.run_id }}/artifacts/LuckyRobots-Linux)
+ - [macOS Build](https://luckyrobots.com/luckyrobots/luckyworld/actions/runs/${{ github.run_id }}/artifacts/LuckyRobots-macOS)
+
+ Or visit our [download page](https://luckyrobots.com/luckyrobots/luckyworld/releases/download/${{ env.RELEASE_TAG }}/downloads.html).
+
+ ### Build Information
+
+ - Build Number: #${{ github.run_number }}
+ - Commit: ${{ github.sha }}
+ - Branch: ${{ github.ref_name }}
+ - Build Date: $(date -u +"%Y-%m-%d %H:%M:%S UTC")
prerelease: ${{ github.ref != 'refs/heads/main' }}
tag_name: '${{ env.RELEASE_TAG }}'
@@ -232,18 +323,35 @@ jobs:
echo "Packaged releases:"
ls -la PackagedReleases/
+ - name: Upload macOS Build Artifact
+ uses: actions/upload-artifact@v3
+ if: success()
+ with:
+ name: LuckyRobots-macOS
+ path: PackagedReleases/*-macOS.zip
+ retention-days: 14
+
+ - name: Create Release Note
+ run: |
+ echo "## macOS Build Completed" > release-note.md
+ echo "" >> release-note.md
+ echo "macOS build is available as an artifact." >> release-note.md
+ echo "" >> release-note.md
+ echo "Download from: [macOS Build](https://luckyrobots.com/luckyrobots/luckyworld/actions/runs/${{ github.run_id }}/artifacts/LuckyRobots-macOS)" >> release-note.md
+
- name: Create Gitea Release
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
uses: https://gitea.com/actions/gitea-release-action@main
with:
token: ${{ secrets.GITEATOKEN }}
tag_name: ${{ env.RELEASE_TAG }}
- title: "Release ${{ env.RELEASE_TAG }}"
+ title: "Release ${{ env.RELEASE_TAG }} - macOS"
body: |
- ## Automated release from CI build #${{ github.run_number }}
+ ## macOS Build Available as Artifact
- This release includes builds for:
- - macOS
+ The macOS build is available as an artifact due to its large file size.
+
+ [Download macOS Build](https://luckyrobots.com/luckyrobots/luckyworld/actions/runs/${{ github.run_id }}/artifacts/LuckyRobots-macOS)
Built from commit: ${{ github.sha }}
- files: PackagedReleases/*.zip
+ files: release-note.md
\ No newline at end of file