Skip to content

Commit

Permalink
deployment/add-scope-and-github-job (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolae-Rares Ailincai authored May 27, 2023
1 parent faf6442 commit 6c202df
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: yarn build

publish-npm:
name: Publish
name: Publish to NPM
needs: build
runs-on: ubuntu-latest
permissions:
Expand All @@ -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}}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 6c202df

Please sign in to comment.