Skip to content

Commit e3d0388

Browse files
authored
GHA: use output api (#23)
1 parent 18b90f6 commit e3d0388

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

.github/workflows/Test.yml

+11-12
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,31 @@ jobs:
2222
julia-version: ["1.10", "1"]
2323
os: [ubuntu-latest, windows-latest, macOS-latest]
2424

25+
outputs:
26+
output_dir: ${{ steps.set_output_dir.outputs.output_dir }}
27+
2528
steps:
2629
- uses: actions/checkout@v4
2730

28-
- name:
29-
if: ${{ matrix.os == 'windows-latest' }}
31+
- name: Set output directory
32+
id: set_output_dir
33+
shell: bash
3034
run: |
3135
mkdir -p $HOME/output
32-
echo "output_dir=$(echo $HOME/output)" >> $env:GITHUB_ENV
33-
34-
- name:
35-
if: ${{ matrix.os != 'windows-latest' }}
36-
run: |
37-
mkdir -p $HOME/output
38-
echo "output_dir=$(echo $HOME/output)" >> $GITHUB_ENV
36+
echo "output_dir=$HOME/output" >> "$GITHUB_OUTPUT"
3937
4038
- uses: julia-actions/setup-julia@v2
4139
with:
4240
version: ${{ matrix.julia-version }}
43-
41+
4442
- uses: julia-actions/julia-buildpkg@v1
43+
4544
- uses: julia-actions/julia-runtest@v1
4645
env:
47-
TEST_OUTPUT_DIR: ${{ env.output_dir }}
46+
TEST_OUTPUT_DIR: ${{ steps.set_output_dir.outputs.output_dir }}
4847

4948
- uses: actions/upload-artifact@v4
5049
if: failure()
5150
with:
5251
name: hanoi_${{ matrix.os }}_${{ matrix.julia_version }}.pdf
53-
path: ${{ env.output_dir }}/hanoi.pdf
52+
path: ${{ steps.set_output_dir.outputs.output_dir }}/hanoi.pdf

0 commit comments

Comments
 (0)