Merge pull request #330 from arabcoders/dev
split windows and nix oses packaging.
This commit is contained in:
commit
034ff25e76
1 changed files with 16 additions and 2 deletions
18
.github/workflows/native-build.yml
vendored
18
.github/workflows/native-build.yml
vendored
|
|
@ -115,8 +115,8 @@ jobs:
|
||||||
name: app-${{ runner.os }}-${{ matrix.arch }}-${{ env.TAG_NAME }}
|
name: app-${{ runner.os }}-${{ matrix.arch }}-${{ env.TAG_NAME }}
|
||||||
path: dist/*
|
path: dist/*
|
||||||
|
|
||||||
- name: Package artifact
|
- name: Package artifact (Unix)
|
||||||
if: startsWith(env.TAG_NAME, 'v')
|
if: startsWith(env.TAG_NAME, 'v') && runner.os != 'Windows'
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release
|
mkdir -p release
|
||||||
ZIP_NAME="ytptube-${{ runner.os }}-${{ matrix.arch }}-${{ env.TAG_NAME }}.zip"
|
ZIP_NAME="ytptube-${{ runner.os }}-${{ matrix.arch }}-${{ env.TAG_NAME }}.zip"
|
||||||
|
|
@ -128,6 +128,20 @@ jobs:
|
||||||
|
|
||||||
zip -r "release/${ZIP_NAME}" dist/
|
zip -r "release/${ZIP_NAME}" dist/
|
||||||
|
|
||||||
|
- name: Package artifact (Windows)
|
||||||
|
if: startsWith(env.TAG_NAME, 'v') && runner.os == 'Windows'
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$zipName = "ytptube-${{ runner.os }}-${{ matrix.arch }}-${{ env.TAG_NAME }}.zip"
|
||||||
|
New-Item -ItemType Directory -Force -Path release | Out-Null
|
||||||
|
|
||||||
|
if (!(Test-Path dist) -or !(Get-ChildItem -Path dist)) {
|
||||||
|
Write-Host "dist directory is empty, skipping packaging."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Compress-Archive -Path dist\* -DestinationPath "release\$zipName"
|
||||||
|
|
||||||
- name: Upload to GitHub Release
|
- name: Upload to GitHub Release
|
||||||
if: startsWith(env.TAG_NAME, 'v')
|
if: startsWith(env.TAG_NAME, 'v')
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue