Skip to content

Commit aac48e5

Browse files
committed
ci: added windows/linux version export as env var
1 parent dc73bba commit aac48e5

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/e2e.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,18 @@ jobs:
111111
Write-Error "An error occurred: $_"
112112
}
113113
- name: Extract version and add it to env variables
114+
if: ${{ inputs.smoke && matrix.os != 'windows' }}
115+
run: |
116+
echo "TESTED_VERSION=$(cat ./TESTED_VERSION.txt)" >> ${GITHUB_ENV}
117+
- name: Extract version and add it to env variables (Windows)
118+
if: ${{ inputs.smoke && matrix.os == 'windows' }}
114119
run: |
115-
cat ./TESTED_VERSION.txt >> ${GITHUB_ENV}
120+
try {
121+
$version = Get-Content -Path .\TESTED_VERSION.txt
122+
echo "TESTED_VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
123+
} catch {
124+
Write-Error "An error occurred: $_"
125+
}
116126
- name: E2E Test (Smoke)
117127
if: ${{ inputs.smoke && matrix.os != 'windows' }}
118128
run: |

.github/workflows/test-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
fetch-depth: 0
7676
- name: Output version
7777
run: |
78-
echo "TESTED_VERSION=$(jq -r '.version' package.json)" > TESTED_VERSION.txt
78+
jq -r '.version' package.json > TESTED_VERSION.txt
7979
cat TESTED_VERSION.txt
8080
- uses: actions/upload-artifact@v4
8181
with:

0 commit comments

Comments
 (0)