Skip to content

Commit

Permalink
fix: Using setps.vars.output
Browse files Browse the repository at this point in the history
  • Loading branch information
gcarreno committed Aug 31, 2023
1 parent b8dfff7 commit 3e337b0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/build.lazarus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ on:
outputs:
win_artefact_path:
description: Path to the stored artefact folder
value: ${{ jobs.build_app.outputs.win_artefact_path }}
value: ${{ steps.vars.outputs.win_artefact_path }}
lin_artefact_path:
description: Path to the stored artefact folder
value: ${{ jobs.build_app.outputs.lin_artefact_path }}
value: ${{ steps.vars.outputs.lin_artefact_path }}
osx_artefact_path:
description: Path to the stored artefact folder
value: ${{ jobs.build_app.outputs.lin_artefact_path }}
value: ${{ steps.vars.outputs.lin_artefact_path }}

jobs:

Expand All @@ -52,10 +52,10 @@ jobs:
- os: macos-latest
triplet: ${{ fromJSON(inputs.triplets).osx }}

outputs:
win_artefact_path: ${{ steps.build_app.outputs.win_artefact_path }}
lin_artefact_path: ${{ steps.build_app.outputs.lin_artefact_path }}
osx_artefact_path: ${{ steps.build_app.outputs.osx_artefact_path }}
# outputs:
# win_artefact_path: ${{ steps.build_app.outputs.win_artefact_path }}
# lin_artefact_path: ${{ steps.build_app.outputs.lin_artefact_path }}
# osx_artefact_path: ${{ steps.build_app.outputs.osx_artefact_path }}

steps:
- name: Print some values
Expand All @@ -66,17 +66,26 @@ jobs:
echo Matrix OS: ${{ matrix.os }}
echo Executable: ${{ env._EXE_ }}
echo Executable with triplet: ${{ env._EXE_TRIPLET_ }}
- name: Build outputs
run: |
case "${{ matrix.os }}" in
"windows-latest")
echo Setting win_artefact_path to ${{ matrix.triplet }}
echo "win_artefact_path=${{ matrix.triplet }}" >> "${GITHUB_OUTPUT}"
echo echo ::set-output name=win_artefact_path::${{ matrix.triplet }}
;;
"ubuntu-latest")
echo Setting lin_artefact_path to ${{ matrix.triplet }}
echo "lin_artefact_path=${{ matrix.triplet }}" >> "${GITHUB_OUTPUT}"
echo echo ::set-output name=lin_artefact_path::${{ matrix.triplet }}
;;
"macos-latest")
echo Setting osx_artefact_path to ${{ matrix.triplet }}
echo "osx_artefact_path=${{ matrix.triplet }}" >> "${GITHUB_OUTPUT}"
echo echo ::set-output name=osx_artefact_path::${{ matrix.triplet }}
;;
esac
- name: Print outputs
run: |
echo Win output: ${{ steps.vars.output.win_artefact_path }}
echo Lin output: ${{ steps.vars.output.lin_artefact_path }}
echo OSX output: ${{ steps.vars.output.osx_artefact_path }}
4 changes: 3 additions & 1 deletion .github/workflows/main.lazarus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ jobs:
needs: [ build, test ]
with:
artefacts: '[
"win": "${{ needs.build.outputs.win_artefact_path }}"
"win": "${{ needs.build.outputs.win_artefact_path }}",
"lin": "${{ needs.build.outputs.lin_artefact_path }}",
"osx": "${{ needs.build.outputs.osx_artefact_path }}"
]'

strategy:
Expand Down

0 comments on commit 3e337b0

Please sign in to comment.