Skip to content

Commit

Permalink
ci: added windows/linux version export as env var
Browse files Browse the repository at this point in the history
  • Loading branch information
andreszorro committed Jan 10, 2025
1 parent dc73bba commit aac48e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,18 @@ jobs:
Write-Error "An error occurred: $_"
}
- name: Extract version and add it to env variables
if: ${{ inputs.smoke && matrix.os != 'windows' }}
run: |
echo "TESTED_VERSION=$(cat ./TESTED_VERSION.txt)" >> ${GITHUB_ENV}
- name: Extract version and add it to env variables (Windows)
if: ${{ inputs.smoke && matrix.os == 'windows' }}
run: |
cat ./TESTED_VERSION.txt >> ${GITHUB_ENV}
try {
$version = Get-Content -Path .\TESTED_VERSION.txt
echo "TESTED_VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
} catch {
Write-Error "An error occurred: $_"
}
- name: E2E Test (Smoke)
if: ${{ inputs.smoke && matrix.os != 'windows' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
fetch-depth: 0
- name: Output version
run: |
echo "TESTED_VERSION=$(jq -r '.version' package.json)" > TESTED_VERSION.txt
jq -r '.version' package.json > TESTED_VERSION.txt
cat TESTED_VERSION.txt
- uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit aac48e5

Please sign in to comment.