Skip to content

Commit

Permalink
split workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
metelkin committed Jan 8, 2025
1 parent b3020d3 commit d93414e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 24 deletions.
61 changes: 37 additions & 24 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [created]

jobs:
upload-release-asset:
upload-macos-release-asset:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -15,61 +15,74 @@ jobs:
- run: npm ci
- name: Build standalone apps
run: |
npx pkg . -t linux,macos --compress GZip
npx pkg . -t 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: Create .deb package
run: |
mkdir -p dist/heta-compiler-deb/DEBIAN
cp build-deb/control dist/heta-compiler-deb/DEBIAN/
mkdir -p dist/heta-compiler-deb/usr/local/bin
cp dist/heta-compiler-linux dist/heta-compiler-deb/usr/local/bin/heta
dpkg-deb --build dist/heta-compiler-deb
- name: Upload Release Asset Linux
- 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-linux
asset_name: heta-compiler-linux-x64
asset_path: dist/heta-compiler-macos
asset_name: heta-compiler-macos-x64
asset_content_type: application/octet-stream

- name: Upload Release Asset Macos
- 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
asset_name: heta-compiler-macos-x64
asset_path: dist/heta-compiler-macos.tar.gz
asset_name: heta-compiler-macos.tar.gz
asset_content_type: application/octet-stream
upload-linux-release-asset:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm ci
- name: Build standalone apps
run: |
npx pkg . -t linux --compress GZip
cd ./dist
cp -f heta-compiler-linux heta-compiler
chmod 775 heta-compiler
tar -czvf ./heta-compiler-linux.tar.gz ./heta-compiler
cd ..
- name: Create .deb package
run: |
mkdir -p dist/heta-compiler-deb/DEBIAN
cp build-deb/control dist/heta-compiler-deb/DEBIAN/
mkdir -p dist/heta-compiler-deb/usr/local/bin
cp dist/heta-compiler-linux dist/heta-compiler-deb/usr/local/bin/heta
dpkg-deb --build dist/heta-compiler-deb
- name: Upload Release TAR.GZ Linux
- 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.tar.gz
asset_name: heta-compiler-linux.tar.gz
asset_path: dist/heta-compiler-linux
asset_name: heta-compiler-linux-x64
asset_content_type: application/octet-stream

- name: Upload Release TAR.GZ Macos
- 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-macos.tar.gz
asset_name: heta-compiler-macos.tar.gz
asset_path: dist/heta-compiler-linux.tar.gz
asset_name: heta-compiler-linux.tar.gz
asset_content_type: application/octet-stream

- name: Upload Release DEB Linux
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit d93414e

Please sign in to comment.