kuzco-cli/.github/workflows/cli.yml

51 lines
1.2 KiB
YAML
Raw Normal View History

name: CLI Build
on: [push, pull_request]
jobs:
2024-03-09 12:02:42 -05:00
build-cli:
runs-on: ubuntu-latest
steps:
2024-03-09 11:56:46 -05:00
- uses: actions/checkout@v4
- name: Set up Node.js
2024-03-09 12:02:42 -05:00
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies (CLI)
run: cd cli && npm install
- name: Install pkg globally
run: npm install -g pkg
- name: Build CLI executables
run: |
cd cli
pkg kuzco-cli.js --targets node18-linux-x64,node18-macos-x64,node18-win-x64
- name: Rename executables
run: |
cd cli
mv kuzco-cli-linux kuzco-cli-linux-x64
mv kuzco-cli-macos kuzco-cli-macos-x64
mv kuzco-cli-win.exe kuzco-cli-win-x64.exe
- name: Upload Linux Executable
2024-03-09 12:02:42 -05:00
uses: actions/upload-artifact@v4
with:
name: kuzco-cli-linux-x64
path: cli/kuzco-cli-linux-x64
- name: Upload macOS Executable
2024-03-09 12:02:42 -05:00
uses: actions/upload-artifact@v4
with:
name: kuzco-cli-macos-x64
path: cli/kuzco-cli-macos-x64
- name: Upload Windows Executable
2024-03-09 12:02:42 -05:00
uses: actions/upload-artifact@v4
with:
name: kuzco-cli-win-x64.exe
path: cli/kuzco-cli-win-x64.exe