From e2821c29d6c18a640d71f397774141513e3843b4 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 3 May 2026 11:48:09 +0530 Subject: [PATCH 1/2] add: "pkg.vc" for CP [continuous previews]. --- .github/workflows/ci.yml | 3 --- .github/workflows/pkg-vc.yml | 48 +++++++++++++++++++++++++++++++++++ .github/workflows/publish.yml | 13 +--------- README.md | 2 ++ 4 files changed, 51 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/pkg-vc.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d1c2c8..8af8990 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,6 @@ name: Plaindown CI on: workflow_dispatch: - push: - branches: - - main pull_request: types: [ opened, diff --git a/.github/workflows/pkg-vc.yml b/.github/workflows/pkg-vc.yml new file mode 100644 index 0000000..663a0cb --- /dev/null +++ b/.github/workflows/pkg-vc.yml @@ -0,0 +1,48 @@ +name: Publish to pkg.vc + +on: + pull_request: + paths: + - "src/**" + - "package.json" + - "bun-lock.yaml" + - "tsconfig.json" + workflow_dispatch: + inputs: + branch: + description: 'Branch to publish from' + required: true + default: 'main' + type: string + +permissions: + pull-requests: write + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.branch || github.ref }} + + - name: Set up Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.3.12 + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Build package + run: bun run build + + - name: Publish to pkg.vc + uses: pkg-vc/publish-action@main + with: + organization: itznotabug + directory: ./ + secret: ${{ secrets.PKG_VC_SECRET }} + github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6369ce9..1c81237 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,15 +24,6 @@ jobs: - name: Install dependencies run: bun install --frozen-lockfile - - name: Lint - run: bun run lint - - - name: Typecheck - run: bun run typecheck - - - name: Test - run: bun test - - name: Build package run: bun run build @@ -43,6 +34,4 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: Publish to npm - run: npm publish --provenance --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npm publish --provenance --access public \ No newline at end of file diff --git a/README.md b/README.md index 1bf6675..1f79302 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![npm version](https://img.shields.io/npm/v/@itznotabug/plaindown.svg?logo=npm&logoColor=white)](https://www.npmjs.com/package/@itznotabug/plaindown) [![License](https://img.shields.io/npm/l/%40itznotabug%2Fplaindown?logo=apache&logoColor=white&color=blue)](https://github.com/ItzNotABug/plaindown/blob/main/LICENSE) +[![CI](https://img.shields.io/github/actions/workflow/status/ItzNotABug/plaindown/ci.yml?logo=github&label=CI)](https://github.com/ItzNotABug/plaindown/actions/workflows/ci.yml) +[![Previews with](https://img.shields.io/badge/Previews%20-pkg.vc-blueviolet)](https://pkg.vc/) [![Vite](https://img.shields.io/badge/Vite-5.x%20|%206.x%20-646CFF.svg?logo=vite&logoColor=white)](https://vite.dev/) [![VitePress](https://img.shields.io/badge/VitePress-1.x-5a67d8.svg?logo=vitepress&logoColor=white)](https://vitepress.dev/) [![TypeScript](https://img.shields.io/badge/TypeScript-ready-3178C6.svg?logo=typescript&logoColor=white)](https://www.typescriptlang.org/) From d4fb34437733a331b0cc68d5ce0b7218d61482a2 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 3 May 2026 11:49:53 +0530 Subject: [PATCH 2/2] fix: typo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f79302..296e47a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![npm version](https://img.shields.io/npm/v/@itznotabug/plaindown.svg?logo=npm&logoColor=white)](https://www.npmjs.com/package/@itznotabug/plaindown) [![License](https://img.shields.io/npm/l/%40itznotabug%2Fplaindown?logo=apache&logoColor=white&color=blue)](https://github.com/ItzNotABug/plaindown/blob/main/LICENSE) [![CI](https://img.shields.io/github/actions/workflow/status/ItzNotABug/plaindown/ci.yml?logo=github&label=CI)](https://github.com/ItzNotABug/plaindown/actions/workflows/ci.yml) -[![Previews with](https://img.shields.io/badge/Previews%20-pkg.vc-blueviolet)](https://pkg.vc/) +[![Previews](https://img.shields.io/badge/Previews-pkg.vc-blueviolet)](https://pkg.vc/) [![Vite](https://img.shields.io/badge/Vite-5.x%20|%206.x%20-646CFF.svg?logo=vite&logoColor=white)](https://vite.dev/) [![VitePress](https://img.shields.io/badge/VitePress-1.x-5a67d8.svg?logo=vitepress&logoColor=white)](https://vitepress.dev/) [![TypeScript](https://img.shields.io/badge/TypeScript-ready-3178C6.svg?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)