diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..580bf39 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,36 @@ +name: Publish to NPM and GPR + +on: + release: + types: [created] + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: yarn install --frozen-lockfile + - run: yarn test:cov + - run: yarn build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + + publish-gpr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://npm.pkg.github.com/ + - run: yarn install --frozen-lockfile + - run: yarn test:cov + - run: yarn build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/package.json b/package.json index 2d1af46..dccc512 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@joindeed/prisma-auth", - "version": "0.1.0", + "version": "0.1.1", "description": "Declarative Prisma Authorization layer", "main": "dist/index.js", "scripts": { @@ -40,4 +40,4 @@ "ts-pegjs": "^1.2.1", "typescript": "^4.4.4" } -} +} \ No newline at end of file