[CI] Init

Registry config removed

[CI] Init
Postpublish

Merge branch 'main' of https://github.com/orionprotocol/sdk

Fix publish-npm

[CI] Init
Fix publish-npm

Merge branch 'main' of https://github.com/orionprotocol/sdk
This commit is contained in:
Aleksandr Kraiz
2022-04-21 22:44:24 +04:00
parent d7ea8e3aff
commit 745b438830
2 changed files with 15 additions and 26 deletions

View File

@@ -5,30 +5,20 @@ on:
types: [created]
jobs:
build:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
node-version: '17.x'
- run: npm ci
- run: npm test
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm run build-ts
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Set package registry
run: npm config set registry https://npm.pkg.github.com
- name: Github package registry authentication
run: npm set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
- name: Npm registry authentication
run: npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Publish the package to Github and Npm package registries
run: npm publish

View File

@@ -15,15 +15,14 @@
"coverage": "jest --coverage",
"lint:eslint": "eslint ./src --ext .ts,.js,.tsx,.jsx",
"lint:eslint:fix": "eslint ./src --ext .ts,.js,.tsx,.jsx --fix",
"typechain:generate-types": "typechain --target=ethers-v5 ./src/abis/*.json --out-dir ./src/artifacts/contracts"
"typechain:generate-types": "typechain --target=ethers-v5 ./src/abis/*.json --out-dir ./src/artifacts/contracts",
"postpublish": "npm run publish-npm",
"publish-npm": "npm publish --access public --ignore-scripts --@orionprotocol:registry='https://registry.npmjs.org'"
},
"repository": {
"type": "git",
"url": "git+https://github.com/orionprotocol/sdk.git"
},
"publishConfig": {
"@orionprotocol:registry": "https://npm.pkg.github.com"
},
"keywords": [
"sdk",
"orion",