Files
VoxelEngine/.github/workflows/release.yml
T

62 lines
1.5 KiB
YAML

# adopted from https://github.com/PrismLauncher/PrismLauncher
name: Release
on:
push:
tags:
- "v*"
jobs:
build_release:
name: Build Release
uses: ./.github/workflows/cmake.yml
with:
build_type: Release
upload_artifacts: true
build_release_macos:
name: Build Release MacOS
uses: ./.github/workflows/macos.yml
with:
upload_artifacts: true
create_release:
needs: [build_release, build_release_macos]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: VoxelEngine
- name: Download artifacts (MacOS)
uses: actions/download-artifact@v4
with:
name: VoxelEngineMacOs
- name: Pack artifacts
run: |
chmod +x VoxelEngine
zip -r VoxelEngine.zip res VoxelEngine
- name: Pack artifacts (MacOS DMG)
run: |
cp VoxelEngineMacApp.dmg VoxelEngine.dmg
- name: Grab and store version
run: |
tag_name=$(echo ${{ github.ref }} | grep -oE "v[^/]+$")
echo "VERSION=$tag_name" >> $GITHUB_ENV
- 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
VoxelEngine.dmg