name: Unreal Release on: workflow_dispatch: jobs: build: runs-on: windows steps: - name: Upload Linux Build Artifact uses: actions/upload-artifact@v3 with: name: LuckyRobots-Linux path: E:\LuckyWorld\LuckyRobots\UNREAL_PROJECTS\Luckyrobots\Builds\Linux\LuckyRobots-Linux.zip retention-days: 14 - name: Upload Windows Build Artifact uses: actions/upload-artifact@v3 with: name: LuckyRobots-Windows path: E:\LuckyWorld\LuckyRobots\UNREAL_PROJECTS\Luckyrobots\Builds\Windows\LuckyRobots-Windows.zip retention-days: 14 - name: Get Release Tag run: | # Fetch all tags git fetch --tags # Get the latest version tag LATEST_TAG=$(git tag -l "v[0-9]*.[0-9]*.[0-9]*" | sort -V | tail -n1) if [ -z "$LATEST_TAG" ]; then NEW_VERSION="1.0.0" else VERSION=${LATEST_TAG#v} MAJOR=$(echo $VERSION | cut -d. -f1) MINOR=$(echo $VERSION | cut -d. -f2) PATCH=$(echo $VERSION | cut -d. -f3) PATCH=$((PATCH + 1)) NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}" fi TAG="v${NEW_VERSION}" echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV echo "Using release tag: $TAG" - name: Create Release uses: https://gitea.com/actions/gitea-release-action@main with: files: |- PackagedReleases/build-info.json PackagedReleases/downloads.html token: '${{ secrets.GITEA_TOKEN }}' title: 'Release ${{ env.RELEASE_TAG }}' body: | ## LuckyRobots Game Release ${{ env.RELEASE_TAG }} ### Download Links 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) ### 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 }}'