Skip to content

Commit

Permalink
ci: add npm publish workflow and publish 0.5 to NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
mootz12 committed Mar 26, 2024
1 parent 375035c commit 0676054
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 8 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/npm_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish Package to npmjs
on:
release:
types: [published]
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: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34 changes: 26 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
{
"version": "0.5.0",
"name": "soroban-governor-js-sdk",
"dependencies": {
"@stellar/freighter-api": "1.7.1",
"buffer": "6.0.3",
"@stellar/stellar-sdk": "11.2.2"
},
"name": "@script3/soroban-governor-sdk",
"description": "Javascript SDK for the Soroban Governor",
"type": "module",
"license": "MIT",
"scripts": {
"build": "node ./scripts/build.mjs"
},
"exports": {
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js"
"import": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts"
},
"typings": "dist/types/index.d.ts",
"files": [
"/dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/script3/soroban-governor-js-sdk.git"
},
"bugs": {
"url": "https://github.com/script3/soroban-governor-js-sdk/issues"
},
"homepage": "https://github.com/script3/soroban-governor-js-sdk#readme",
"dependencies": {
"@stellar/freighter-api": "1.7.1",
"buffer": "6.0.3",
"@stellar/stellar-sdk": "11.2.2"
},
"devDependencies": {
"typescript": "5.3.3"
}
}
}

0 comments on commit 0676054

Please sign in to comment.