Skip to content

Commit

Permalink
feat: add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ALPAC-4 committed Mar 8, 2024
1 parent b0e2e47 commit 8404112
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/npm_publish_initia_registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: NPM publish initia-registry

on:
push:
branches: ["main"]
paths:
- package/package.json

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
working-directory: ./api-types
- run: npm run build
working-directory: ./api-types
- run: npm publish
working-directory: ./api-types
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }}
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "./dist/types/index.d.ts",
"exports": {
".": "./dist/types/index.js",
"./zods": "./zods/index.ts"
"./zod": "./zods/index.ts"
},
"scripts": {
"build": "tsc -p tsconfig.prod.json --module commonjs",
Expand Down

0 comments on commit 8404112

Please sign in to comment.