MihailRis 6bd1103f88 fix
2025-12-08 19:21:49 +03:00

66 lines
2.0 KiB
YAML

name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Engine release version'
required: true
default: "0.0.0"
branch:
description: 'Release branch name'
required: true
default: "release-0.0"
pull_request:
branches: ["main"]
env:
RELEASE_VERSION: ${{ github.event.inputs.version || 'testrelease' }}
BRANCH_NAME: ${{ github.event.inputs.branch || 'main' }}
jobs:
build_linux:
uses: ./.github/workflows/appimage.yml
build_macos:
uses: ./.github/workflows/macos.yml
build_windows:
uses: ./.github/workflows/windows-clang.yml
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
run: |
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}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release Draft
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.RELEASE_VERSION }}
draft: true
files: |
./release/*
generate_release_notes: true