From 6c202df52fb9622300bff42867d30e2acfd82d25 Mon Sep 17 00:00:00 2001 From: Nicolae-Rares Ailincai Date: Sat, 27 May 2023 18:53:32 +0300 Subject: [PATCH] deployment/add-scope-and-github-job (#26) --- .github/workflows/publish.yml | 30 +++++++++++++++++++++++++++++- package.json | 4 ++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8759dec..ee74c5c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,7 +23,7 @@ jobs: run: yarn build publish-npm: - name: Publish + name: Publish to NPM needs: build runs-on: ubuntu-latest permissions: @@ -47,3 +47,31 @@ jobs: run: npm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + + publish-github: + name: Publish to GitHub + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + packages: write + environment: + name: NPM + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 20.0 + uses: actions/setup-node@v3 + with: + node-version: 20.0 + cache: 'yarn' + registry-url: https://npm.pkg.github.com + scope: '@raresail' + - name: Install Dependencies + run: yarn install --frozen-lockfile + - name: Build + run: yarn build + - name: Publish + run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/package.json b/package.json index 48a8a5a..f13300f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "prisma-mapper", - "version": "1.5.0", + "name": "@raresail/prisma-mapper", + "version": "1.5.1", "description": "A CLI that adds @Map, @@Map, @updatedAt based on a json or camel case for the prisma schema", "main": "bin/index.js", "preferGlobal": true,