Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
timosachsenberg authored Apr 18, 2024
1 parent f1238df commit 35880f1
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ jobs:
- name: Normalize path on windows
id: normalize_ws
run: |
echo "NORMALIZED_WORKSPACE=$(echo ${{ github.workspace }} | sed 's/\\/\//g')" >> $GITHUB_ENV
echo "$NORMALIZED_WORKSPACE"
shell: bash
$normalizedWorkspace = $env:GITHUB_WORKSPACE -replace '\\', '/'
Write-Output "NORMALIZED_WORKSPACE=$normalizedWorkspace" >> $env:GITHUB_OUTPUT
shell: pwsh

- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
Expand Down Expand Up @@ -104,13 +104,24 @@ jobs:
tar -czvf "contrib_build-${{ runner.os }}.tar.gz" $(ls -d lib) $(ls -d bin) $(ls -d include) $(ls -d share)
shell: bash

- name: Create Release
if: github.event_name == 'workflow_dispatch'
id: create_release
- name: Create Release (Windows)
if: github.event_name == 'workflow_dispatch' && runner.os == "Windows"
id: create_release_win
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.generate_tag_name.outputs.TAG_NAME }}
files: |
"${{ steps.normalize_ws.outputs.NORMALIZED_WORKSPACE }}/contrib-build/contrib_build-${{runner.os}}.tar.gz"
- name: Create Release (Mac and Linux)
if: github.event_name == 'workflow_dispatch' && runner.os != "Windows"
id: create_release_mac_linux
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.generate_tag_name.outputs.TAG_NAME }}
files: |
"${{ github.workspace }}/contrib-build/contrib_build-${{runner.os}}.tar.gz"

0 comments on commit 35880f1

Please sign in to comment.