Skip to content

Commit

Permalink
build dist separately win and others
Browse files Browse the repository at this point in the history
  • Loading branch information
metelkin committed Sep 4, 2024
1 parent e5b8c43 commit 3244914
Showing 1 changed file with 57 additions and 44 deletions.
101 changes: 57 additions & 44 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
upload-release-asset:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
Expand All @@ -15,14 +15,67 @@ jobs:
- run: npm ci
- name: Build standalone apps
run: |
npm run pkg
npx pkg . -t linux,macos --compress GZip
cd ./dist
cp -f heta-compiler-linux heta-compiler
chmod 775 heta-compiler
tar -czvf ./heta-compiler-linux.tar.gz ./heta-compiler
cp -f heta-compiler-macos heta-compiler
chmod 775 heta-compiler
tar -czvf ./heta-compiler-macos.tar.gz ./heta-compiler
cd ..
- name: Upload Release Asset Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/heta-compiler-linux
asset_name: heta-compiler-linux-x64
asset_content_type: application/octet-stream

- name: Upload Release Asset Macos
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/heta-compiler-macos
asset_name: heta-compiler-macos-x64
asset_content_type: application/octet-stream

- name: Upload Release TAR.GZ Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/heta-compiler-linux.tar.gz
asset_name: heta-compiler-linux.tar.gz
asset_content_type: application/octet-stream

- name: Upload Release TAR.GZ Macos
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/heta-compiler-macos.tar.gz
asset_name: heta-compiler-macos.tar.gz
asset_content_type: application/octet-stream
upload-windows-release-asset:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20.x
- run: npm ci
- name: Build standalone apps
run: |
npx pkg . -t win --compress GZip
cd ./dist
cp -f heta-compiler-win.exe heta-compiler.exe
tar -czvf ./heta-compiler-windows.tar.gz ./heta-compiler.exe
cd ..
Expand Down Expand Up @@ -54,7 +107,7 @@ jobs:
& ${env:WIX}bin\candle.exe -o dist/ build-win-installer/perUser.wxs
& ${env:WIX}bin\light.exe -o dist/heta-compiler-win-x64-installer.msi dist/perUser.wixobj -ext WixUIExtension
- name: Upload Release Asset Win
- name: Upload Release Asset Win MSI
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -64,7 +117,7 @@ jobs:
asset_name: heta-compiler-${{ steps.package_version.outputs.VERSION }}-win-x64-installer.msi
asset_content_type: application/octet-stream

- name: Upload Release Asset Win
- name: Upload Release Asset Win EXE
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -74,26 +127,6 @@ jobs:
asset_name: heta-compiler-win-x64.exe
asset_content_type: application/octet-stream

- name: Upload Release Asset Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/heta-compiler-linux
asset_name: heta-compiler-linux-x64
asset_content_type: application/octet-stream

- name: Upload Release Asset Macos
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/heta-compiler-macos
asset_name: heta-compiler-macos-x64
asset_content_type: application/octet-stream

- name: Upload Release TAR.GZ Windows
uses: actions/upload-release-asset@v1
env:
Expand All @@ -103,23 +136,3 @@ jobs:
asset_path: dist/heta-compiler-windows.tar.gz
asset_name: heta-compiler-windows.tar.gz
asset_content_type: application/octet-stream

- name: Upload Release TAR.GZ Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/heta-compiler-linux.tar.gz
asset_name: heta-compiler-linux.tar.gz
asset_content_type: application/octet-stream

- name: Upload Release TAR.GZ Macos
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/heta-compiler-macos.tar.gz
asset_name: heta-compiler-macos.tar.gz
asset_content_type: application/octet-stream

0 comments on commit 3244914

Please sign in to comment.