-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance
tangle-substrate-types
& Fix Auto Release Issues (#791)
* ci: build using tsc * feat: export type bundles for Polkadot * feat: add archive flag to run standalone script * fix: fix testnet build * ci: revert bunchee build * chore: run update types * fix: fix release-it * chore: enable github release
- Loading branch information
Showing
19 changed files
with
1,058 additions
and
961 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 |
---|---|---|
|
@@ -9,31 +9,52 @@ on: | |
branches: | ||
- main | ||
paths: | ||
- 'types/src/**' | ||
- 'types/package.json' | ||
- 'types/src/interfaces/**' | ||
- 'types/src/index.ts' | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install npm dependencies | ||
run: cd types && yarn install | ||
|
||
# Configure SSH with private SSH key | ||
- name: Attach SSH key | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.GIT_SSH_PRIVATE_KEY }} | ||
|
||
- name: Configure Github Actions user | ||
run: | | ||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
- name: Initialize the NPM config | ||
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Install npm dependencies | ||
run: | | ||
cd types | ||
yarn install | ||
- name: Publish the package | ||
run: cd types && yarn publish-types --ci | ||
run: | | ||
cd types | ||
yarn publish-types --ci | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_IT_GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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 |
---|---|---|
|
@@ -26,6 +26,7 @@ chainspecs/standalone-local.json | |
|
||
# NodeJS | ||
**/node_modules/ | ||
**.npmrc | ||
types/build | ||
types/ts-types | ||
|
||
|
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
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 |
---|---|---|
|
@@ -8,10 +8,14 @@ export default { | |
commitMessage: 'Release `tangle-substrate-types` v${version}', | ||
tagName: '${npm.name}/v${version}', | ||
tagAnnotation: 'Release ${npm.name} v${version}', | ||
pushRepo: '[email protected]:tangle-network/tangle.git', | ||
}, | ||
github: { | ||
release: true, | ||
releaseName: 'Release ${npm.name} v${version}', | ||
releaseNotes(context) { | ||
return `Release ${context.npm.name} version ${context.version}` | ||
}, | ||
}, | ||
npm: { | ||
publish: true, | ||
|
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 |
---|---|---|
@@ -1,11 +1,14 @@ | ||
{ | ||
"name": "@webb-tools/tangle-substrate-types", | ||
"version": "0.5.13", | ||
"version": "0.9.0", | ||
"description": "Polkadot.js type definitions required for interacting with Webb's tangle network", | ||
"author": "Webb Developers <[email protected]>", | ||
"license": "Apache-2.0", | ||
"repository": "https://github.com/webb-tools/tangle.git", | ||
"homepage": "https://github.com/webb-tools/tangle", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/tangle-network/tangle.git" | ||
}, | ||
"homepage": "https://github.com/tangle-network/tangle", | ||
"files": [ | ||
"build" | ||
], | ||
|
@@ -25,7 +28,7 @@ | |
"registry": "https://registry.npmjs.org" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/webb-tools/tangle/issues" | ||
"url": "https://github.com/tangle-network/tangle/issues" | ||
}, | ||
"scripts": { | ||
"build": "bunchee", | ||
|
@@ -34,7 +37,8 @@ | |
"build:interfaces:chain": "tsx node_modules/.bin/polkadot-types-from-chain --output ./src/interfaces --package @webb-tools/tangle-substrate-types --endpoint ws://127.0.0.1:9944", | ||
"clean": "rm -rf build", | ||
"publish-types": "release-it patch", | ||
"update:metadata": "tsx ./scripts/updateMetadata.ts" | ||
"update:metadata": "tsx ./scripts/updateMetadata.ts", | ||
"prepare": "ts-patch install -s" | ||
}, | ||
"dependencies": { | ||
"@polkadot/api": "^13.2.1", | ||
|
@@ -46,11 +50,13 @@ | |
"devDependencies": { | ||
"@types/node": "^22.6.1", | ||
"@types/ws": "^8.5.12", | ||
"bunchee": "^5.4.0", | ||
"bunchee": "^5.5.1", | ||
"prettier": "3.2.5", | ||
"release-it": "^17.6.0", | ||
"ts-patch": "^3.2.1", | ||
"tsx": "^4.19.1", | ||
"typescript": "5.4.2", | ||
"typescript-transform-paths": "^3.5.1", | ||
"ws": "^8.18.0" | ||
}, | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
|
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
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
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
Oops, something went wrong.