- Split single 'nupst-binaries' artifact into 6 individual artifacts - Each platform binary now shows as separate downloadable item in UI - Artifacts: nupst-linux-x64, nupst-linux-arm64, nupst-macos-x64, nupst-macos-arm64, nupst-windows-x64.exe, SHA256SUMS.txt
120 lines
2.8 KiB
YAML
120 lines
2.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'migration/**'
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
check:
|
|
name: Type Check & Lint
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Deno
|
|
uses: denoland/setup-deno@v1
|
|
with:
|
|
deno-version: v1.x
|
|
|
|
- name: Check TypeScript types
|
|
run: deno check mod.ts
|
|
|
|
- name: Lint code
|
|
run: deno lint
|
|
continue-on-error: true
|
|
|
|
- name: Format check
|
|
run: deno fmt --check
|
|
continue-on-error: true
|
|
|
|
build:
|
|
name: Build Test (Current Platform)
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Deno
|
|
uses: denoland/setup-deno@v1
|
|
with:
|
|
deno-version: v1.x
|
|
|
|
- name: Compile for current platform
|
|
run: |
|
|
echo "Testing compilation for Linux x86_64..."
|
|
deno compile --allow-all --no-check \
|
|
--output nupst-test \
|
|
--target x86_64-unknown-linux-gnu mod.ts
|
|
|
|
- name: Test binary execution
|
|
run: |
|
|
chmod +x nupst-test
|
|
./nupst-test --version
|
|
./nupst-test help
|
|
|
|
build-all:
|
|
name: Build All Platforms
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Deno
|
|
uses: denoland/setup-deno@v1
|
|
with:
|
|
deno-version: v1.x
|
|
|
|
- name: Compile all platform binaries
|
|
run: bash scripts/compile-all.sh
|
|
|
|
- name: Upload Linux x64 binary
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: nupst-linux-x64
|
|
path: dist/binaries/nupst-linux-x64
|
|
retention-days: 30
|
|
|
|
- name: Upload Linux ARM64 binary
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: nupst-linux-arm64
|
|
path: dist/binaries/nupst-linux-arm64
|
|
retention-days: 30
|
|
|
|
- name: Upload macOS x64 binary
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: nupst-macos-x64
|
|
path: dist/binaries/nupst-macos-x64
|
|
retention-days: 30
|
|
|
|
- name: Upload macOS ARM64 binary
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: nupst-macos-arm64
|
|
path: dist/binaries/nupst-macos-arm64
|
|
retention-days: 30
|
|
|
|
- name: Upload Windows x64 binary
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: nupst-windows-x64.exe
|
|
path: dist/binaries/nupst-windows-x64.exe
|
|
retention-days: 30
|
|
|
|
- name: Upload SHA256 checksums
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: SHA256SUMS.txt
|
|
path: dist/binaries/SHA256SUMS.txt
|
|
retention-days: 30
|