Skip to content

Commit

Permalink
Update workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosK92 authored Jan 16, 2025
1 parent 7aab46c commit 2ff90aa
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ jobs:
- name: Install Python dependencies
run: python -m pip install requests tqdm

- name: Generate version
id: version
run: |
echo "version=$(date +'%Y.%m.%d.%H.%M')" >> $GITHUB_ENV
echo "Generated version: ${{ env.version }}"
- name: Generate project files
shell: python
env:
Expand All @@ -71,17 +65,21 @@ jobs:
shell: cmd
run: |
echo "Creating artifacts for ${{ matrix.api }} - ${{ matrix.configuration }}"
SET BUILD_NAME=spartan_${{ matrix.api }}_${{ matrix.configuration }}_${{ env.version }}
echo "Build name: %BUILD_NAME%"
build_scripts\7z.exe a -bb1 %BUILD_NAME%.7z .\binaries\7z.exe .\binaries\dxcompiler.dll .\binaries\download_assets.py .\binaries\file_utilities.py .\binaries\fmod.dll .\binaries\data .\binaries\spartan_${{ matrix.api }}_${{ matrix.configuration }}.exe
echo "::set-output name=artifact_name::%BUILD_NAME%.7z"
IF "${{ matrix.configuration }}" == "Release" (
echo "Creating binaries-only archive for Release..."
build_scripts\7z.exe a -bb1 spartan_vulkan_release.7z .\binaries\7z.exe .\binaries\dxcompiler.dll .\binaries\download_assets.py .\binaries\file_utilities.py .\binaries\fmod.dll .\binaries\data .\binaries\spartan_${{ matrix.api }}.exe
) ELSE (
echo "Creating binaries-only archive for Debug..."
build_scripts\7z.exe a -bb1 spartan_vulkan_debug.7z .\binaries\7z.exe .\binaries\dxcompiler.dll .\binaries\download_assets.py .\binaries\file_utilities.py .\binaries\fmodL.dll .\binaries\data .\binaries\spartan_${{ matrix.api }}_debug.exe
)
echo "Artifact creation completed for ${{ matrix.api }} - ${{ matrix.configuration }}"
- name: Upload artifact
if: github.event_name != 'pull_request' && matrix.api == 'vulkan'
uses: actions/upload-artifact@v4
with:
name: spartan_${{ matrix.api }}_${{ matrix.configuration }}_${{ env.version }}
path: ${{ steps.create-artifacts.outputs.artifact_name }}
name: spartan_vulkan_${{ matrix.configuration == 'Release' && 'release' || 'debug' }}
path: spartan_vulkan_${{ matrix.configuration == 'Release' && 'release' || 'debug' }}.7z

release:
if: github.event_name != 'pull_request'
Expand All @@ -96,22 +94,26 @@ jobs:
- name: Download vulkan release build
uses: actions/download-artifact@v4
with:
name: spartan_vulkan_Release_${{ env.version }}
name: spartan_vulkan_release
path: spartan_vulkan_release.7z

- name: Download vulkan debug build
uses: actions/download-artifact@v4
with:
name: spartan_vulkan_Debug_${{ env.version }}
name: spartan_vulkan_debug
path: spartan_vulkan_debug.7z

- name: Get date for versioning
id: get_date
run: echo "version=$(date +'%Y.%m.%d')" >> $GITHUB_OUTPUT

- name: Publish release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.version }}"
automatic_release_tag: "v${{ steps.get_date.outputs.version }}"
prerelease: true
title: "Development Build v${{ env.version }}"
title: "Version ${{ steps.get_date.outputs.version }}"
files: |
spartan_vulkan_release.7z
spartan_vulkan_debug.7z
Expand Down

0 comments on commit 2ff90aa

Please sign in to comment.