mirror of
https://github.com/theoleuthardt/DinoGame.git
synced 2026-06-13 09:27:57 +00:00
fix: assets path in build directory and compression of builds
This commit is contained in:
parent
78b942caf3
commit
629bb63422
1 changed files with 36 additions and 2 deletions
38
.github/workflows/release.yml
vendored
38
.github/workflows/release.yml
vendored
|
|
@ -38,6 +38,13 @@ jobs:
|
||||||
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
|
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
|
||||||
shell: powershell
|
shell: powershell
|
||||||
|
|
||||||
|
- name: Create Build Directories
|
||||||
|
run: |
|
||||||
|
mkdir -p build/windows/assets
|
||||||
|
mkdir -p build/linux/assets
|
||||||
|
mkdir -p build/macos/assets
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: cmake -B build
|
run: cmake -B build
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
@ -46,15 +53,42 @@ jobs:
|
||||||
run: cmake --build build --config Release
|
run: cmake --build build --config Release
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
- name: Determine Output Directory
|
||||||
|
id: get-output-dir
|
||||||
|
run: |
|
||||||
|
if [ "${{ runner.os }}" == "Windows" ]; then
|
||||||
|
echo "output_dir=build/windows" >> $GITHUB_OUTPUT
|
||||||
|
elif [ "${{ runner.os }}" == "macOS" ]; then
|
||||||
|
echo "output_dir=build/macos" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "output_dir=build/linux" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Zip Build with Assets (Linux/macOS)
|
||||||
|
if: runner.os != 'Windows'
|
||||||
|
run: |
|
||||||
|
cd ${{ steps.get-output-dir.outputs.output_dir }}
|
||||||
|
zip -r ../../DinoGame-${{ runner.os }}.zip .
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Zip Build with Assets (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
run: |
|
||||||
|
cd ${{ steps.get-output-dir.outputs.output_dir }}
|
||||||
|
powershell Compress-Archive -Path .\* -DestinationPath ..\..\DinoGame-${{ runner.os }}.zip
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: DinoGame-${{ runner.os }}
|
name: DinoGame-${{ runner.os }}
|
||||||
path: build/DinoGame*
|
path: DinoGame-${{ runner.os }}.zip
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event.inputs.question == 'YES'
|
||||||
steps:
|
steps:
|
||||||
- name: Download All Artifacts
|
- name: Download All Artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
|
|
@ -68,4 +102,4 @@ jobs:
|
||||||
tag_name: ${{ github.ref_name }}
|
tag_name: ${{ github.ref_name }}
|
||||||
name: Release ${{ github.ref_name }}
|
name: Release ${{ github.ref_name }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
Loading…
Add table
Add a link
Reference in a new issue