diff --git a/.gitea/workflows/create-release.yml b/.gitea/workflows/create-release.yml new file mode 100644 index 00000000..f5250303 --- /dev/null +++ b/.gitea/workflows/create-release.yml @@ -0,0 +1,54 @@ +name: Create Release + +on: + workflow_dispatch: + inputs: + version: + description: 'Version for this release (e.g. 1.0.0)' + required: true + default: '' + prerelease: + description: 'Is this a pre-release?' + required: true + default: 'false' + type: boolean + description: + description: 'Release description' + required: false + default: 'New release' + +jobs: + create-release: + runs-on: macos + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + # lfs: true + fetch-depth: 0 + + - name: Create Tag + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' + run: | + TAG="v${{ github.run_number }}" + echo "Creating git tag: $TAG" + + # Configure git with token authentication + git config --global user.email "actions@gitea.com" + git config --global user.name "Gitea Actions" + git remote set-url origin "https://${{ secrets.GITEATOKEN }}@gitea.com/goran/lyra_game_ue.git" + + if ! git rev-parse "$TAG" >/dev/null 2>&1; then + git tag -a "$TAG" -m "Release $TAG" + git push origin "$TAG" + fi + echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV + + - 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 }}" + files: Builds/** \ No newline at end of file diff --git a/.gitea/workflows/unreal-build.yml b/.gitea/workflows/unreal-build.yml index 43d20218..5d89e362 100644 --- a/.gitea/workflows/unreal-build.yml +++ b/.gitea/workflows/unreal-build.yml @@ -161,81 +161,81 @@ jobs: path: BuildOutput/ retention-days: 7 - # macos-build: - # runs-on: macos - # steps: - # - name: Checkout repository - # uses: actions/checkout@v3 - # with: - # lfs: true - # fetch-depth: 0 + macos-build: + runs-on: macos + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + lfs: true + fetch-depth: 0 - # - name: Setup Unreal Engine - # run: | - # # Use the correct path where Unreal Engine is installed - # UE_PATH="/Users/Shared/Epic Games/UE_5.5" + - name: Setup Unreal Engine + run: | + # Use the correct path where Unreal Engine is installed + UE_PATH="/Users/Shared/Epic Games/UE_5.5" - # if [ ! -d "$UE_PATH" ]; then - # echo "Error: Unreal Engine is not installed in the expected location" - # echo "Please ensure Unreal Engine is installed at $UE_PATH" - # exit 1 - # fi + if [ ! -d "$UE_PATH" ]; then + echo "Error: Unreal Engine is not installed in the expected location" + echo "Please ensure Unreal Engine is installed at $UE_PATH" + exit 1 + fi - # # Set environment variable with the correct Engine path - # echo "UE_ROOT=$UE_PATH/Engine" >> $GITHUB_ENV - # echo "Using Unreal Engine 5.5" + # Set environment variable with the correct Engine path + echo "UE_ROOT=$UE_PATH/Engine" >> $GITHUB_ENV + echo "Using Unreal Engine 5.5" - # - name: Build Unreal Project - # run: | - # # Debug information - # echo "=== Environment Information ===" - # echo "macOS Version:" - # sw_vers - # echo "Current working directory: $(pwd)" - # ls -la # List all files in current directory + - name: Build Unreal Project + run: | + # Debug information + echo "=== Environment Information ===" + echo "macOS Version:" + sw_vers + echo "Current working directory: $(pwd)" + ls -la # List all files in current directory - # echo "=== Unreal Engine Information ===" - # ls -la "$UE_ROOT/Build/BatchFiles" + echo "=== Unreal Engine Information ===" + ls -la "$UE_ROOT/Build/BatchFiles" - # echo "=== Project Information ===" - # # Detailed search for the project file - # echo "Searching for .uproject files:" - # find . -name "*.uproject" -type f + echo "=== Project Information ===" + # Detailed search for the project file + echo "Searching for .uproject files:" + find . -name "*.uproject" -type f - # # Get the absolute path of the project file - # UPROJECT_PATH=$(find . -name "*.uproject" -type f | head -1) - # if [ -z "$UPROJECT_PATH" ]; then - # echo "Error: Could not find .uproject file" - # exit 1 - # fi + # Get the absolute path of the project file + UPROJECT_PATH=$(find . -name "*.uproject" -type f | head -1) + if [ -z "$UPROJECT_PATH" ]; then + echo "Error: Could not find .uproject file" + exit 1 + fi - # # Convert to absolute path and verify file exists - # UPROJECT_ABSOLUTE_PATH=$(realpath "$UPROJECT_PATH") - # echo "Project absolute path: $UPROJECT_ABSOLUTE_PATH" + # Convert to absolute path and verify file exists + UPROJECT_ABSOLUTE_PATH=$(realpath "$UPROJECT_PATH") + echo "Project absolute path: $UPROJECT_ABSOLUTE_PATH" - # if [ ! -f "$UPROJECT_ABSOLUTE_PATH" ]; then - # echo "Error: Project file does not exist at: $UPROJECT_ABSOLUTE_PATH" - # exit 1 - # fi + if [ ! -f "$UPROJECT_ABSOLUTE_PATH" ]; then + echo "Error: Project file does not exist at: $UPROJECT_ABSOLUTE_PATH" + exit 1 + fi - # echo "Using Unreal Engine at: $UE_ROOT" + echo "Using Unreal Engine at: $UE_ROOT" - # # Make the project file readable and executable - # chmod 755 "$UPROJECT_ABSOLUTE_PATH" + # Make the project file readable and executable + chmod 755 "$UPROJECT_ABSOLUTE_PATH" - # # Run the build using absolute paths - # chmod +x "$UE_ROOT/Build/BatchFiles/RunUAT.sh" - # "$UE_ROOT/Build/BatchFiles/RunUAT.sh" BuildCookRun \ - # -project="$UPROJECT_ABSOLUTE_PATH" \ - # -noP4 \ - # -platform=Mac \ - # -clientconfig=Development \ - # -cook -build -stage -pak -archive \ - # -archivedirectory="$(pwd)/Build" + # Run the build using absolute paths + chmod +x "$UE_ROOT/Build/BatchFiles/RunUAT.sh" + "$UE_ROOT/Build/BatchFiles/RunUAT.sh" BuildCookRun \ + -project="$UPROJECT_ABSOLUTE_PATH" \ + -noP4 \ + -platform=Mac \ + -clientconfig=Development \ + -cook -build -stage -pak -archive \ + -archivedirectory="$(pwd)/Build" - # - name: Upload build artifacts - # uses: actions/upload-artifact@v3 - # with: - # name: macos-build - # path: Build/ - # retention-days: 7 \ No newline at end of file + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: macos-build + path: Build/ + retention-days: 7 \ No newline at end of file