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_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_windows] steps: - name: Checkout Release Branch uses: actions/checkout@v4 with: ref: ${{ env.BRANCH_NAME }} - name: Download Build Artifact uses: actions/download-artifact@v3 with: path: ./artifacts - name: Show Artifacts run: | mkdir release mv ./artifacts/AppImage/VoxelCore-latest-x86_64.AppImage \ ./release/voxelcore-${RELEASE_VERSION}_x86-64.AppImage (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 - **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 }}