Skip to content

Commit

Permalink
chore(bun): update bun and cross-compile for all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
tchak committed May 7, 2024
1 parent 2699f6a commit 12b588c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 49 deletions.
50 changes: 12 additions & 38 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,28 @@
name: Build CLI

on:
on:
push:
tags:
- '*'
- "*"

jobs:
release:
runs-on: ubuntu-latest
needs: [build-linux, build-macos]
permissions:
contents: write
steps:
- name: Download Linux build
uses: actions/download-artifact@v3
with:
name: ds-api-client-linux
- name: Download macOS build
uses: actions/download-artifact@v3
with:
name: ds-api-client-macos
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- name: Build for Linux
run: bun run compile:linux
- name: Build for macOS
run: bun run compile:darwin
- name: Build for windows
run: bun run compile:windows
- name: Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
artifacts: "ds-api-client-linux, ds-api-client-macos"
artifacts: "ds-api-client-linux-x64, ds-api-client-darwin-arm64, ds-api-client.exe"
artifactErrorsFailBuild: true
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun run compile
- run: mv ds-api-client ds-api-client-linux
- name: Upload Linux build
uses: actions/upload-artifact@v3
with:
name: ds-api-client-linux
path: ds-api-client-linux
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun run compile
- run: mv ds-api-client ds-api-client-macos
- name: Upload macOS build
uses: actions/upload-artifact@v3
with:
name: ds-api-client-macos
path: ds-api-client-macos
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,6 @@ dist
.pnp.\*

data
ds-api-client
/ds-api-client.exe
/ds-api-client-darwin-arm64
/ds-api-client-linux-x64
Binary file modified bun.lockb
Binary file not shown.
22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,29 @@
"version": "0.1.0",
"scripts": {
"ds": "bun src/command.ts",
"compile": "bun build ./src/command.ts --compile --minify --target bun --outfile ds-api-client",
"compile:windows": "bun build ./src/command.ts --compile --minify --target bun-windows-x64-baseline --outfile ds-api-client.exe",
"compile:linux": "bun build ./src/command.ts --compile --minify --target bun-linux-x64 --outfile ds-api-client-linux-x64",
"compile:darwin": "bun build ./src/command.ts --compile --minify --target bun-darwin-arm64 --outfile ds-api-client-darwin-arm64",
"up": "npx npm-check-updates --interactive --format group"
},
"devDependencies": {
"@commander-js/extra-typings": "^11.1.0",
"@commander-js/extra-typings": "^12.0.1",
"@types/cli-progress": "^3.11.5",
"@types/geojson": "^7946.0.13",
"@types/geojson": "^7946.0.14",
"@types/proj4": "^2.5.5",
"bun-types": "latest",
"typescript": "^5.3.2"
"typescript": "^5.4.5"
},
"trustedDependencies": ["sharp"],
"dependencies": {
"@turf/turf": "^6.5.0",
"chrono-node": "^2.7.3",
"chrono-node": "^2.7.5",
"cli-progress": "^3.12.0",
"commander": "^11.1.0",
"console-table-printer": "^2.11.2",
"commander": "^12.0.0",
"console-table-printer": "^2.12.0",
"geojson2svg": "^2.0.1",
"proj4": "^2.9.2",
"remeda": "^1.29.0",
"zod": "^3.22.4"
"proj4": "^2.11.0",
"remeda": "^1.61.0",
"zod": "^3.23.6"
}
}

0 comments on commit 12b588c

Please sign in to comment.