Skip to content

Commit

Permalink
try publish to github packages (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelQZQ authored May 30, 2024
1 parent 990824a commit 09f70fb
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/small-deers-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@thalalabs/surf': patch
---

upgrade dependencies
9 changes: 9 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 20.x

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

- run: yarn install --frozen-lockfile
- run: yarn test
- name: Create Release Pull Request or Publish
Expand Down
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,28 @@ When you input `client.useABI(COIN_ABI).view.` into your IDE, the auto-completio

### Installation


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).


```shell
npm i @thalalabs/surf @aptos-labs/ts-sdk
```

If you want to use the React Hooks, install the `@aptos-labs/wallet-adapter-react@^2.0.0` additionally. Those React Hooks will be moved to a separate package in near future.
If you want to use the React Hooks, install the `@aptos-labs/wallet-adapter-react` additionally. Those React Hooks will be moved to a separate package in near future.

### Start

Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@
"blockchain",
"aptos"
],
"publishConfig": {
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ThalaLabs/surf"
Expand Down

0 comments on commit 09f70fb

Please sign in to comment.