feat(ci): upload artifacts and make release

This commit is contained in:
Ilia
2023-12-27 17:08:13 +03:00
parent 69a17c25ea
commit 4ddc8dd18c
4 changed files with 93 additions and 14 deletions
+43
View File
@@ -0,0 +1,43 @@
# 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
create_release:
needs: build_release
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: VoxelEngine
- name: Pack artifacts
run: |
chmod +x VoxelEngine
zip -r VoxelEngine.zip res VoxelEngine
- 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