From d93414e5d305e7e8455eda87dba500ecdd4d03ac Mon Sep 17 00:00:00 2001 From: Evgeny Metelkin Date: Wed, 8 Jan 2025 14:35:36 +0200 Subject: [PATCH] split workflows --- .github/workflows/on-release.yml | 61 ++++++++++++-------- {Formula => build-homebrew}/README.md | 0 {Formula => build-homebrew}/heta-compiler.rb | 0 3 files changed, 37 insertions(+), 24 deletions(-) rename {Formula => build-homebrew}/README.md (100%) rename {Formula => build-homebrew}/heta-compiler.rb (100%) diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml index e89f33f3..c3dc99b9 100644 --- a/.github/workflows/on-release.yml +++ b/.github/workflows/on-release.yml @@ -5,7 +5,7 @@ on: types: [created] jobs: - upload-release-asset: + upload-macos-release-asset: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -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 diff --git a/Formula/README.md b/build-homebrew/README.md similarity index 100% rename from Formula/README.md rename to build-homebrew/README.md diff --git a/Formula/heta-compiler.rb b/build-homebrew/heta-compiler.rb similarity index 100% rename from Formula/heta-compiler.rb rename to build-homebrew/heta-compiler.rb