diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml new file mode 100644 index 0000000..5b3cd02 --- /dev/null +++ b/.github/workflows/release-package.yml @@ -0,0 +1,43 @@ +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + #- uses: actions/setup-node@v4 + # with: + # node-version: 16 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: | + - args: [--frozen-lockfile] + #- run: npm test + + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://npm.pkg.github.com/ + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: | + - args: [--frozen-lockfile] + - run: pnpm publish --recursive --access=public --no-git-checks + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.gitignore b/.gitignore index 1eae0cf..2275535 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ dist/ node_modules/ + +pnpm-publish-summary.json \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..63c4fe3 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@xennis:registry=https://npm.pkg.github.com diff --git a/packages/render/package.json b/packages/render/package.json index d289a95..cb9c9cc 100644 --- a/packages/render/package.json +++ b/packages/render/package.json @@ -1,7 +1,14 @@ { - "name": "@react-notion-render/render", - "version": "0.0.1", + "name": "@xennis/react-notion-render", + "version": "0.0.1-alpha.1", "description": "React renderer for Notion,", + "repository": { + "url": "https://github.com/Xennis/react-notion-render", + "directory": "packages/render" + }, + "publishConfig": { + "@xennis:registry": "https://npm.pkg.github.com" + }, "author": "Xennis", "license": "", "main": "dist/index.js",