fix: add GitHub server check to workflows and streamline CMake installation
Build / Build (push) Has been skipped
Release / gitea-draft-release (push) Successful in 2s
Release / prepare (push) Has been skipped
Release / build_linux (push) Has been skipped
Release / build_macos (push) Has been skipped
Release / build_windows (push) Has been skipped
Release / publish_release (push) Has been skipped
MSVC Build / build-windows (windows-latest) (push) Has been cancelled

This commit is contained in:
ShiftyX1
2025-12-09 00:58:41 +03:00
parent 3da03fdd7f
commit c7f98a176f
7 changed files with 101 additions and 90 deletions
+40 -24
View File
@@ -1,5 +1,4 @@
name: Build and Release
run-name: ${{ github.actor }} preparing release
name: Release
on:
push:
tags:
@@ -14,7 +13,31 @@ env:
RELEASE_VERSION: ${{ github.event.inputs.version || github.ref_name || 'testrelease' }}
BRANCH_NAME: ${{ github.event_name == 'workflow_dispatch' && github.ref_name || 'main' }}
jobs:
# Gitea job - create draft release on tag push
gitea-draft-release:
if: github.server_url != 'https://github.com'
runs-on: ubuntu-latest
steps:
- name: Create Draft Release on Gitea
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: VoxelCore ${{ github.ref_name }}
draft: true
body: |
## VoxelCore Release ${{ github.ref_name }}
### Downloads
Артефакты будут загружены вручную после сборки на GitHub.
---
**Full Changelog**: https://git.pyserve.org/PulseStudio/VoxelEngine/commits/tag/${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
# GitHub jobs - full build and release
prepare:
# Only run on GitHub, skip on Gitea
if: github.server_url == 'https://github.com'
runs-on: ubuntu-latest
steps:
- run: echo "exists just for outputs"
@@ -25,6 +48,11 @@ jobs:
uses: ./.github/workflows/appimage.yml
with:
build_name: '${{ needs.prepare.outputs.build_name }}'
build_macos:
needs: [prepare]
uses: ./.github/workflows/macos.yml
with:
build_name: '${{ needs.prepare.outputs.build_name }}'
build_windows:
needs: [prepare]
uses: ./.github/workflows/windows-clang.yml
@@ -32,7 +60,7 @@ jobs:
build_name: '${{ needs.prepare.outputs.build_name }}'
publish_release:
runs-on: ubuntu-latest
needs: [build_linux, build_windows]
needs: [build_linux, build_macos, build_windows]
steps:
- name: Checkout Release Branch
uses: actions/checkout@v4
@@ -47,38 +75,26 @@ jobs:
mkdir release
mv ./artifacts/AppImage/VoxelCore-latest-x86_64.AppImage \
./release/voxelcore-${RELEASE_VERSION}_x86-64.AppImage
mv ./artifacts/VoxelEngineMacOs/VoxelEngineMacApp.dmg \
./release/voxelcore-${RELEASE_VERSION}_macos.dmg
(cd ./artifacts/Windows-Build && zip -r ../../release/voxelcore-${RELEASE_VERSION}_win64.zip .)
ls -la ./release
tree ./release
- name: Create Tag
if: github.event_name == 'workflow_dispatch'
run: |
git config --local user.email "action@gitea.com"
git config --local user.name "Gitea Action"
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
TAG_NAME="v${RELEASE_VERSION}"
git tag -a "${TAG_NAME}" -m "Automated release tag ${TAG_NAME}"
git push origin "${TAG_NAME}"
- name: Create Release with assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release Draft
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.RELEASE_VERSION }}
name: VoxelCore v${{ env.RELEASE_VERSION }}
body: |
## VoxelCore Release ${{ env.RELEASE_VERSION }}
### Downloads
- **Linux**: voxelcore-${{ env.RELEASE_VERSION }}_x86-64.AppImage
- **Windows**: voxelcore-${{ env.RELEASE_VERSION }}_win64.zip
### Installation
Download the appropriate file for your platform and run it.
---
**Full Changelog**: https://git.pyserve.org/PulseStudio/VoxelEngine/compare/v0.0.0...v${{ env.RELEASE_VERSION }}
draft: true
prerelease: false
files: |
./release/*
token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: true