Skip to content

Commit

Permalink
feat: All with config
Browse files Browse the repository at this point in the history
  • Loading branch information
gcarreno committed Sep 1, 2023
1 parent 7cc24ca commit bf77385
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/build.lazarus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,16 @@ jobs:
runs-on: ${{ matrix.os }}

env:
_EXE_: ${{ matrix.os == 'windows-latest' && format('{0}.exe', fromJSON(inputs.config).app-name) || fromJSON(inputs.config).app-name }}
_EXE_TRIPLET_: ${{ matrix.os == 'windows-latest' && format('{0}-{1}.exe', inputs.app-name, fromJSON(inputs.config).triplets[matrix.os]) || format('{0}-{1}', inputs.app-name, fromJSON(inputs.config).triplets[matrix.os]) }}
_EXE_: ${{
matrix.os == 'windows-latest' &&
format('{0}.exe', fromJSON(inputs.config).app-name) ||
fromJSON(inputs.config).app-name
}}
_EXE_TRIPLET_: ${{
matrix.os == 'windows-latest' &&
format('{0}-{1}.exe', inputs.app-name, fromJSON(inputs.config).triplets[matrix.os]) ||
format('{0}-{1}', inputs.app-name, fromJSON(inputs.config).triplets[matrix.os])
}}

strategy:
matrix:
Expand Down Expand Up @@ -93,16 +101,16 @@ jobs:
run: |
case "${{ matrix.os }}" in
"windows-latest")
echo Setting win-artefact-path to ${{ matrix.triplet }}
echo ::set-output name=win-artefact-path::${{ matrix.triplet }}
echo Setting win-artefact-path to ${{ fromJSON(inputs.config).triplets[matrix.os] }}
echo "win-artefact-path=${{ fromJSON(inputs.config).triplets[matrix.os] }}" >> "$GIT_OUTPUT"
;;
"ubuntu-latest")
echo Setting lin-artefact-path to ${{ matrix.triplet }}
echo ::set-output name=lin-artefact-path::${{ matrix.triplet }}
echo Setting lin-artefact-path to ${{ fromJSON(inputs.config).triplets[matrix.os] }}
echo "lin-artefact-path=${{ fromJSON(inputs.config).triplets[matrix.os] }}" >> "$GIT_OUTPUT"
;;
"macos-latest")
echo Setting osx-artefact-path to ${{ matrix.triplet }}
echo ::set-output name=osx-artefact-path::${{ matrix.triplet }}
echo Setting osx-artefact-path to ${{ fromJSON(inputs.config).triplets[matrix.os] }}
echo "osx-artefact-path=${{ fromJSON(inputs.config).triplets[matrix.os] }}" >> "$GIT_OUTPUT"
;;
esac
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.lazarus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ jobs:
runs-on: ${{ matrix.os }}

env:
_EXE_: ${{ matrix.os == 'windows-latest' && format('{0}.exe', fromJSON(inputs.config).app-name) || fromJSON(inputs.config).app-name }}
_EXE_: ${{
matrix.os == 'windows-latest' &&
format('{0}.exe', fromJSON(inputs.config).app-name) ||
fromJSON(inputs.config).app-name
}}

strategy:
matrix:
Expand Down

0 comments on commit bf77385

Please sign in to comment.