From ccadcf0a407195a452f8cd016fbd1e404a2f868d Mon Sep 17 00:00:00 2001 From: yt lin <0312fs3@gmail.com> Date: Tue, 15 Feb 2022 02:32:24 +0800 Subject: [PATCH] github package registry --- .github/workflows/publish.yml | 29 +++++++++++++++++++++++++++++ package.json | 4 ++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 313bbd6..bbca4d1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,6 +13,35 @@ jobs: node-version: "16.x" registry-url: "https://registry.npmjs.org" - run: npm ci + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "16.x" + registry-url: "https://registry.npmjs.org" + - run: npm ci - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "16.x" + registry-url: https://npm.pkg.github.com/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GPR_TOKEN}} diff --git a/package.json b/package.json index ada1436..fc2b82b 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "sveth", - "version": "0.0.4", + "version": "0.0.5", "description": "eth hook for svelte in typescript", "main": "src/index.ts", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"No test specified\" && exit 0" }, "repository": { "type": "git",