Skip to content

Commit 6bcbeb9

Browse files
bgauduchbgauduch
andauthored
Use environnement files instead of deprecated set-output commands (#68)
* use environnement files instead of deprecated set-output commands * correct version file path * ⚗️ debuging versino matrix * ⚗️ debuging version matrix * ⚗️ debuging version matrix * ⚗️ debuging version matrix * improve versions loading using jq --------- Co-authored-by: bgauduch <user.personal@users.noreply.github.com>
1 parent 1bf70d0 commit 6bcbeb9

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

.github/workflows/build-test.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,8 @@ jobs:
3636
- name: Save supported versions as output
3737
id: set-matrix
3838
run: |
39-
SUPPORTED_VERSIONS=$(cat ./supported_versions.json)
40-
SUPPORTED_VERSIONS="${SUPPORTED_VERSIONS//'%'/%25}"
41-
SUPPORTED_VERSIONS="${SUPPORTED_VERSIONS//$'\n'/%0A}"
42-
SUPPORTED_VERSIONS="${SUPPORTED_VERSIONS//$'\r'/%0D}"
43-
echo "::set-output name=matrix::${SUPPORTED_VERSIONS}"
39+
VERSIONS=$(cat ./supported_versions.json | jq -c)
40+
echo "matrix=${VERSIONS}" >> $GITHUB_OUTPUT
4441
4542
build-test:
4643
runs-on: ubuntu-22.04

.github/workflows/release.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@ jobs:
1919
- name: Save supported versions as output
2020
id: set-matrix
2121
run: |
22-
VERSIONS=$(cat ./supported_versions.json)
23-
VERSIONS="${VERSIONS//'%'/%25}"
24-
VERSIONS="${VERSIONS//$'\n'/%0A}"
25-
VERSIONS="${VERSIONS//$'\r'/%0D}"
26-
echo "::set-output name=matrix::${VERSIONS}"
22+
VERSIONS=$(cat ./supported_versions.json | jq -c)
23+
echo "matrix=${VERSIONS}" >> $GITHUB_OUTPUT
2724
2825
build_push_release:
2926
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)