ShiftyX1 ee7b1d4299
Some checks failed
Build / Build (push) Failing after 17s
MSVC Build / build-windows (windows-latest) (push) Has been cancelled
refactor: update release workflow for improved tagging and asset management
2025-12-08 19:41:32 +03:00

93 lines
3.0 KiB
YAML

name: Build and Release
run-name: ${{ github.actor }} preparing release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Engine release version'
required: true
default: "0.0.0"
env:
RELEASE_VERSION: ${{ github.event.inputs.version || github.ref_name || 'testrelease' }}
BRANCH_NAME: ${{ github.event_name == 'workflow_dispatch' && github.ref_name || 'main' }}
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- run: echo "exists just for outputs"
outputs:
build_name: '${{ env.RELEASE_VERSION }}'
build_linux:
needs: [prepare]
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
with:
build_name: '${{ needs.prepare.outputs.build_name }}'
publish_release:
runs-on: ubuntu-latest
needs: [build_linux, build_macos, build_windows]
steps:
- name: Checkout Release Branch
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}
- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Show Artifacts
run: |
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"
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
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
- **macOS**: voxelcore-${{ env.RELEASE_VERSION }}_macos.dmg
- **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 }}