Skip to content

Commit

Permalink
Update cmake-multi-platform.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ld3 authored Sep 28, 2024
1 parent da118b5 commit cfb95fb
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ jobs:
fetch-depth: 0 # complete history
fetch-tags: true

- name: Get Git Tag
- name: Get Git Tag Linux
id: tags
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Get Git Tag Windows
id: tags_win
run: echo $tag = $env:GITHUB_REF -replace 'refs/tags/', ''
shell: pwsh

- name: Install Qt6 dependencies for Windows
if: runner.os == 'Windows'
Expand Down Expand Up @@ -109,16 +114,16 @@ jobs:
if [ "${{ runner.os }}" == "Linux" ]; then
cd ${{ steps.strings.outputs.build-output-dir }}/install && tar -cvzf ../../dartomato-build-${{ matrix.os }}-${{ matrix.build_type }}-${{ steps.tags.outputs.tag }}.tar.gz *
else
pwsh -Command "Compress-Archive -Path '${{ steps.strings.outputs.build-output-dir }}/bin/*' -DestinationPath 'dartomato-build-${{ matrix.os }}-${{ matrix.build_type }}-${{ steps.tags.outputs.tag }}.zip'"
pwsh -Command "Compress-Archive -Path '${{ steps.strings.outputs.build-output-dir }}/bin/*' -DestinationPath 'dartomato-build-${{ matrix.os }}-${{ matrix.build_type }}-${{ steps.tags_win.outputs.tag }}.zip'"
fi
shell: bash

- name: Upload Artifacts
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: dartomat-build-${{ matrix.os }}-${{ matrix.build_type }}-${{ steps.tags.outputs.tag }}
path: dartomat-build-${{ matrix.os }}-${{ matrix.build_type }}-${{ steps.tags.outputs.tag }}.${{ runner.os == 'Linux' && 'tar.gz' || 'zip' }}
name: dartomat-build-${{ matrix.os }}-${{ matrix.build_type }}-${{ runner.os == 'Linux' && steps.tags.outputs.tag || steps.tags_win.outputs.tag }}
path: dartomat-build-${{ matrix.os }}-${{ matrix.build_type }}-${{ runner.os == 'Linux' && steps.tags.outputs.tag || steps.tags_win.outputs.tag }}.${{ runner.os == 'Linux' && 'tar.gz' || 'zip' }}

deploy:
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -133,9 +138,14 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: Get Git Tag
- name: Get Git Tag Linux
id: tags
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Get Git Tag Windows
id: tags_win
run: echo $tag = $env:GITHUB_REF -replace 'refs/tags/', ''
shell: pwsh

- name: Download Linux Artifacts
uses: actions/download-artifact@v4
Expand All @@ -146,7 +156,7 @@ jobs:
- name: Download Windows Artifacts
uses: actions/download-artifact@v4
with:
name: dartomato-build-windows-latest-Release-${{ steps.tags.outputs.tag }}
name: dartomato-build-windows-latest-Release-${{ steps.tags_win.outputs.tag }}
path: ./windows/

- name: Create Release
Expand Down Expand Up @@ -176,7 +186,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./windows/dartomato-build-windows-latest-Release-${{ steps.tags.outputs.tag }}.zip
asset_name: dartomato-build-windows-latest-Release-${{ steps.tags.outputs.tag }}.zip
asset_path: ./windows/dartomato-build-windows-latest-Release-${{ steps.tags_win.outputs.tag }}.zip
asset_name: dartomato-build-windows-latest-Release-${{ steps.tags_win.outputs.tag }}.zip
asset_content_type: application/zip

0 comments on commit cfb95fb

Please sign in to comment.