Skip to content

Commit

Permalink
Updated Pipeline To Support Multi-OS
Browse files Browse the repository at this point in the history
  • Loading branch information
coldsofttech committed Apr 11, 2024
1 parent 6132c0b commit 3dadd6d
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,21 @@ jobs:
run: |
python setup.py sdist
- name: Get Package Name
- name: Get Package Name (Windows)
if: matrix.os == 'windows-latest'
run: |
if [ ${{ matrix.os }} == "windows-latest" ]; then
$path_separator = "\\"
$latestFile = Get-ChildItem -Path "dist\\" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
Write-Host "Latest file: $latestFile"
Write-Output "PACKAGE_NAME=dist$path_separator$($latestFile.Name)" | Out-File -FilePath $env:GITHUB_ENV -Append
else
if [ ${{ matrix.os }} == "ubuntu-latest" ] || [ ${{ matrix.os }} == "macos-latest" ]; then
path_separator="/"
latestFile=$(ls -t dist/ | head -n 1)
echo "Latest file: $latestFile"
echo "PACKAGE_NAME=dist$path_separator$latestFile" >> $GITHUB_ENV
fi
fi
shell: bash
$path_separator = "\\"
$latestFile = Get-ChildItem -Path "dist\\" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
Write-Host "Latest file: $latestFile"
Write-Output "PACKAGE_NAME=dist$path_separator$($latestFile.Name)" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Get Package Name (Ubuntu and macOS)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: |
path_separator="/"
latestFile=$(ls -t dist/ | head -n 1)
echo "Latest file: $latestFile"
echo "PACKAGE_NAME=dist$path_separator$latestFile" >> $GITHUB_ENV
- name: Install Package
run: |
Expand Down

0 comments on commit 3dadd6d

Please sign in to comment.