-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from polkadot-api/vo-governance-sdk
Governance-sdk: bounties and referenda
- Loading branch information
Showing
30 changed files
with
2,504 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
merge_group: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v3 | ||
- name: Setup Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: pnpm | ||
- name: Install deps | ||
run: pnpm install | ||
- name: Build | ||
run: pnpm build | ||
- name: Lint | ||
run: pnpm lint | ||
- name: Test | ||
run: pnpm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v3 | ||
- name: Setup Node.js 20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: pnpm | ||
registry-url: https://registry.npmjs.org | ||
- name: Install deps | ||
run: pnpm install | ||
- name: Build | ||
run: pnpm build | ||
- name: Lint | ||
run: pnpm lint | ||
- name: Test | ||
run: pnpm test | ||
publish: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
value: [sdk-governance, sdk-ink] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check if version has been updated | ||
id: check | ||
uses: EndBug/version-check@v2 | ||
with: | ||
diff-search: true | ||
file-name: ./packages/${{ matrix.value }}/package.json | ||
- uses: actions/cache@v3 | ||
if: steps.check.outputs.changed == 'true' | ||
with: | ||
path: .turbo | ||
key: ${{ runner.os }}-20.x-turbo-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-20.x-turbo- | ||
- uses: pnpm/action-setup@v3 | ||
if: steps.check.outputs.changed == 'true' | ||
- name: Setup Node.js 20.x | ||
if: steps.check.outputs.changed == 'true' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: pnpm | ||
registry-url: https://registry.npmjs.org | ||
- name: Install deps | ||
if: steps.check.outputs.changed == 'true' | ||
run: pnpm install | ||
- name: Build | ||
if: steps.check.outputs.changed == 'true' | ||
run: pnpm build | ||
- name: Publish | ||
if: steps.check.outputs.changed == 'true' | ||
working-directory: packages/${{ matrix.value }} | ||
run: | | ||
pnpm publish --no-git-checks --access=public --tag latest | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_AUTOMATION_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,8 @@ | |
"rollup": "^4.25.0", | ||
"rollup-plugin-dts": "^6.1.1", | ||
"rollup-plugin-esbuild": "^6.1.1", | ||
"typescript": "^5.6.3", | ||
"typescript": "^5.7.3", | ||
"vitest": "^2.1.4" | ||
} | ||
}, | ||
"packageManager": "[email protected]+sha1.c85a4305534f76d461407b59277b954bac97b5c4" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
## Unreleased | ||
|
||
Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# @polkadot-api/ink-sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"name": "@polkadot-api/sdk-governance", | ||
"version": "0.0.1", | ||
"sideEffects": false, | ||
"author": "Victor Oliva (https://github.com/voliva)", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/polkadot-api/papi-sdks.git" | ||
}, | ||
"exports": { | ||
".": { | ||
"node": { | ||
"production": { | ||
"import": "./dist/esm/index.mjs", | ||
"require": "./dist/min/index.js", | ||
"default": "./dist/index.js" | ||
}, | ||
"import": "./dist/esm/index.mjs", | ||
"require": "./dist/index.js", | ||
"default": "./dist/index.js" | ||
}, | ||
"module": "./dist/esm/index.mjs", | ||
"import": "./dist/esm/index.mjs", | ||
"require": "./dist/index.js", | ||
"default": "./dist/index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"main": "./dist/index.js", | ||
"module": "./dist/esm/index.mjs", | ||
"browser": "./dist/esm/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "tsc --noEmit && rollup -c ../../rollup.config.js", | ||
"lint": "prettier --check README.md \"src/**/*.{js,jsx,ts,tsx,json,md}\"", | ||
"format": "prettier --write README.md \"src/**/*.{js,jsx,ts,tsx,json,md}\"", | ||
"prepack": "pnpm run build" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"@polkadot-api/common-sdk-utils": "workspace:*", | ||
"@react-rxjs/utils": "^0.9.7" | ||
}, | ||
"peerDependencies": { | ||
"@noble/hashes": ">=1.6.1", | ||
"polkadot-api": ">=1.8.1", | ||
"rxjs": ">=7.8.0" | ||
}, | ||
"devDependencies": { | ||
"@noble/hashes": "^1.6.1", | ||
"polkadot-api": "^1.8.1", | ||
"rxjs": "^7.8.1" | ||
} | ||
} |
Oops, something went wrong.