Skip to content

Commit

Permalink
Merge pull request #77 from ThalaLabs/publish-on-npm
Browse files Browse the repository at this point in the history
publish on npm
  • Loading branch information
SamuelQZQ authored Jun 4, 2024
2 parents e99ef6d + 73cb61b commit 785fe33
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 47 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//npm.pkg.github.com/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cache: 'pnpm'

- run: pnpm i
- name: Create Release Pull Request or Publish
id: changesets
Expand Down
16 changes: 0 additions & 16 deletions packages/thalaswap-math/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ SDK to calculate swap amounts and pool price.

# install

Edit or add a `.npmrc` file to including following lines:
```
//npm.pkg.github.com/:_authToken=_authToken
@thalalabs:registry=https://npm.pkg.github.com
```

Run command to login:
```
$ npm login --registry=https://npm.pkg.github.com
> Username: USERNAME
> Password: TOKEN
```

USERNAME is you github account username. Get the token from your github settings, see ["Managing your personal access tokens."](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).


```
$ npm i @thalalabs/thalaswap-math
```
Expand Down
3 changes: 1 addition & 2 deletions packages/thalaswap-math/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"author": "",
"license": "MIT",
"publishConfig": {
"access": "public",
"registry": "https://npm.pkg.github.com"
"access": "public"
},
"repository": {
"type": "git",
Expand Down
17 changes: 0 additions & 17 deletions packages/thalaswap-router/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,6 @@ SDK to get optimal swap routing for ThalaSwap. Currently, we support finding rou

## Install

Edit or add a `.npmrc` file to including following lines:

```
//npm.pkg.github.com/:_authToken=_authToken
@thalalabs:registry=https://npm.pkg.github.com
```

Run command to login:

```
$ npm login --registry=https://npm.pkg.github.com
> Username: USERNAME
> Password: TOKEN
```

USERNAME is you github account username. Get the token from your github settings, see ["Managing your personal access tokens."](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).

```
$ npm i @thalalabs/router-sdk
```
Expand Down
3 changes: 1 addition & 2 deletions packages/thalaswap-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"dist"
],
"publishConfig": {
"access": "public",
"registry": "https://npm.pkg.github.com"
"access": "public"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 785fe33

Please sign in to comment.