From e27ff25bbf714297ea142def21f968b5d93ca1f3 Mon Sep 17 00:00:00 2001 From: Cotton Hou Date: Mon, 29 Jul 2024 12:16:40 +0800 Subject: [PATCH] wip --- .github/workflows/bun.yml | 49 +++++++++++++++++++++++++++++++++++++++ package.json | 7 ++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/bun.yml create mode 100644 package.json diff --git a/.github/workflows/bun.yml b/.github/workflows/bun.yml new file mode 100644 index 0000000..f6c4a17 --- /dev/null +++ b/.github/workflows/bun.yml @@ -0,0 +1,49 @@ +name: Bundle + +on: push + +jobs: + + publish: + + runs-on: ubuntu-latest + timeout-minutes: 3 + + permissions: + contents: read + id-token: write + + steps: + + - uses: actions/checkout@v4 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: preBuild + run: |- + mkdir ./dist + bun install + + - name: Build + run: bun build ./src/main.ts + --target node + --format esm + --outdir ./dist + --entry-naming [name]-[hash].[ext] + + - name: Build min + run: bun build ./src/main.ts + --target node + --format esm + --outdir ./dist + --entry-naming [name]-[hash].min.[ext] + --minify + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: key-gen-${{ hashFiles(./dist/*.js) }} + path: ./dist + diff --git a/package.json b/package.json new file mode 100644 index 0000000..55d105c --- /dev/null +++ b/package.json @@ -0,0 +1,7 @@ +{ + "name": "at-key-gen-ssh-ed25519", + "version": "1.0.0", + "dependencies": { + "micro-key-producer": "~0.7.0" + } +}