diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd4a086..2cd008c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 + with: + bun-version: 1.1.8 - name: Install dependencies run: bun install diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml new file mode 100644 index 0000000..3f60123 --- /dev/null +++ b/.github/workflows/github-pages.yml @@ -0,0 +1,24 @@ +on: + push: + branches: [master] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v1 + with: + bun-version: 1.1.8 + + - name: Install dependencies + run: bun install + + - name: Build app + run: bun run build + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: dist \ No newline at end of file diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml new file mode 100644 index 0000000..3dab4cf --- /dev/null +++ b/.github/workflows/publish-to-npm.yml @@ -0,0 +1,22 @@ +on: + push: + tags: + - "v*" + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "20.x" + registry-url: "https://registry.npmjs.org" + + - name: Publish package + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + run: npm publish --provenance --access public diff --git a/bun.lockb b/bun.lockb index 55ac0e3..aeb5f22 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index b0f2f46..e417685 100644 --- a/package.json +++ b/package.json @@ -23,13 +23,11 @@ } }, "scripts": { - "dev": "rollup -cw", - "predeploy": "rollup -c", - "deploy": "gh-pages -d dist", - "test": "svelte-check --workspace test" + "dev": "bun --bun rollup -cw", + "build": "bun --bun rollup -c", + "test": "bun --bun svelte-check --workspace test" }, "devDependencies": { - "gh-pages": "^4.0.0", "svelte": "^4.2.17", "svelte-check": "^3.7.1", "svelte-readme": "^3.6.3"