mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Merge pull request #721 from MihailRis/new-pipeline
new automatic release pipeline
This commit is contained in:
commit
dc1afa9a28
4 changed files with 61 additions and 38 deletions
1
.github/workflows/appimage.yml
vendored
1
.github/workflows/appimage.yml
vendored
|
|
@ -5,6 +5,7 @@ on:
|
||||||
branches: [ "main", "release-**"]
|
branches: [ "main", "release-**"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main", "dev" ]
|
branches: [ "main", "dev" ]
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-appimage:
|
build-appimage:
|
||||||
|
|
|
||||||
1
.github/workflows/macos.yml
vendored
1
.github/workflows/macos.yml
vendored
|
|
@ -5,6 +5,7 @@ on:
|
||||||
branches: [ "main", "release-**"]
|
branches: [ "main", "release-**"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main", "dev" ]
|
branches: [ "main", "dev" ]
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-dmg:
|
build-dmg:
|
||||||
|
|
|
||||||
94
.github/workflows/release.yml
vendored
94
.github/workflows/release.yml
vendored
|
|
@ -1,43 +1,63 @@
|
||||||
# adopted from https://github.com/PrismLauncher/PrismLauncher
|
|
||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
tags:
|
inputs:
|
||||||
- "v*"
|
version:
|
||||||
|
description: 'Engine release version'
|
||||||
|
required: true
|
||||||
|
default: "0.0.0"
|
||||||
|
branch:
|
||||||
|
description: 'Release branch name'
|
||||||
|
required: true
|
||||||
|
default: "release-0.0"
|
||||||
|
env:
|
||||||
|
RELEASE_VERSION: ${{ github.event.inputs.version || 'testrelease' }}
|
||||||
|
BRANCH_NAME: ${{ github.event.inputs.branch || 'main' }}
|
||||||
jobs:
|
jobs:
|
||||||
build_release:
|
build_linux:
|
||||||
name: Build Release
|
uses: ./.github/workflows/appimage.yml
|
||||||
uses: ./.github/workflows/cmake.yml
|
build_macos:
|
||||||
with:
|
uses: ./.github/workflows/macos.yml
|
||||||
build_type: Release
|
build_windows:
|
||||||
upload_artifacts: true
|
uses: ./.github/workflows/windows-clang.yml
|
||||||
|
publish_release:
|
||||||
create_release:
|
|
||||||
needs: build_release
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build_linux, build_macos, build_windows]
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Checkout Release Branch
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
name: VoxelEngine
|
ref: ${{ env.BRANCH_NAME }}
|
||||||
- name: Pack artifacts
|
- name: Download Build Artifact
|
||||||
run: |
|
uses: actions/download-artifact@v4
|
||||||
chmod +x VoxelEngine
|
with:
|
||||||
zip -r VoxelEngine.zip res VoxelEngine
|
path: ./artifacts
|
||||||
- name: Grab and store version
|
- name: Show Artifacts
|
||||||
run: |
|
run: |
|
||||||
tag_name=$(echo ${{ github.ref }} | grep -oE "v[^/]+$")
|
mkdir release
|
||||||
echo "VERSION=$tag_name" >> $GITHUB_ENV
|
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
|
||||||
|
|
||||||
- name: Create release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
name: VoxelEngine ${{ env.VERSION }}
|
|
||||||
draft: true
|
|
||||||
prerelease: false
|
|
||||||
files: |
|
|
||||||
VoxelEngine.zip
|
|
||||||
|
|
|
||||||
3
.github/workflows/windows-clang.yml
vendored
3
.github/workflows/windows-clang.yml
vendored
|
|
@ -4,7 +4,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main", "release-**"]
|
branches: [ "main", "release-**"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main", "dev" ]
|
branches: [ "main", "dev" ]
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue