Skip to content

Commit

Permalink
feat: attach binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Nov 14, 2024
1 parent 4782f43 commit 159b171
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 25 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ jobs:
- name: Install Dependencies
run: bun install

- name: Build the release
run: bun run build

- name: Publish to npm
run: bun publish --access public
env:
Expand All @@ -41,3 +38,16 @@ jobs:
run: bunx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Attach Binaries
uses: softprops/action-gh-release@v2
with:
body_path: CHANGELOG.md
files: |
bin/dtsx-linux-x64
bin/dtsx-linux-arm64
bin/dtsx-windows-x64.exe
bin/dtsx-darwin-x64
bin/dtsx-darwin-arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*.pem
coverage
dist
bin/rpx*
lib-cov
logs
node_modules
Expand Down
4 changes: 1 addition & 3 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ await Bun.build({
})

await $`cp ./dist/src/index.js ./dist/index.js`
await $`rm -rf ./dist/src`
await $`cp ./dist/bin/cli.js ./dist/cli.js`
await $`rm -rf ./dist/src`
await $`rm -rf ./dist/bin`
await $`cp ./bin/cli.d.ts ./dist/cli.d.ts`
await $`rm ./bin/cli.d.ts`

log.success('Built')
27 changes: 12 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,46 +26,43 @@
],
"exports": {
".": {
"bun": "./src/index.ts",
"import": "./dist/index.js"
},
"./*": {
"bun": "./src/*",
"import": "./dist/*"
}
},
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"bin": {
"bun-reverse-proxy": "./dist/cli.js",
"rpx": "./dist/cli.js",
"reverse-proxy": "./dist/cli.js"
},
"files": [
"dist",
"scripts",
"src"
],
"files": ["README.md", "dist"],
"scripts": {
"build": "bun build.ts && bun run compile",
"compile": "bun build ./bin/cli.ts --compile --minify --outfile dist/reverse-proxy",
"compile": "bun build ./bin/cli.ts --compile --minify --outfile bin/rpx",
"compile:all": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64",
"compile:linux-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile dist/reverse-proxy-linux-x64",
"compile:linux-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile dist/reverse-proxy-linux-arm64",
"compile:windows-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile dist/reverse-proxy-windows-x64.exe",
"compile:darwin-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile dist/reverse-proxy-darwin-x64",
"compile:darwin-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile dist/reverse-proxy-darwin-arm64",
"compile:linux-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/rpx-linux-x64",
"compile:linux-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/rpx-linux-arm64",
"compile:windows-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/rpx-windows-x64.exe",
"compile:darwin-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/rpx-darwin-x64",
"compile:darwin-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/rpx-darwin-arm64",
"lint": "bunx eslint .",
"lint:fix": "bunx eslint . --fix",
"fresh": "bunx rimraf node_modules/ bun.lock && bun i",
"changelog": "bunx changelogen --output CHANGELOG.md",
"prepublishOnly": "bun --bun run build",
"prepublishOnly": "bun --bun run build && bun run compile:all",
"release": "bun run changelog && bunx bumpp package.json --all",
"test": "bun test",
"typecheck": "bunx tsc --noEmit",
"dev:docs": "vitepress dev docs",
"build:docs": "vitepress build docs",
"preview:docs": "vitepress preview docs"
},
"dependencies": {
"@stacksjs/tlsx": "^0.3.3"
},
"devDependencies": {
"@stacksjs/cli": "^0.68.2",
"@stacksjs/eslint-config": "^3.8.1-beta.2",
Expand Down
4 changes: 0 additions & 4 deletions reverse-proxy.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ import path from 'node:path'
const config: ReverseProxyOptions = {
from: 'localhost:5173',
to: 'stacks.localhost',
// key: 'content of the key',
// keyPath: '/absolute/path/to/the/key',
keyPath: path.join(os.homedir(), '.stacks', 'ssl', `stacks.localhost.crt.key`),
// cert: 'content of the cert',
// certPath: '/absolute/path/to/the/cert',
certPath: path.join(os.homedir(), '.stacks', 'ssl', `stacks.localhost.crt`),
caCertPath: path.join(os.homedir(), '.stacks', 'ssl', `stacks.localhost.ca.crt`),
httpsRedirect: false,
Expand Down
File renamed without changes.

0 comments on commit 159b171

Please sign in to comment.