Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test branch are actions running on pr #2

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/build-and-publish-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and Publish NPM package

on:
pull_request:

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Run build
run: npm run build

- id: current-version
name: Get current version
run: echo "CURRENT_VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_OUTPUT

- id: sha
name: Get commit sha
run: echo "SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Set publish version
run: npm version --no-git-tag-version $CURRENT_VERSION-$SHA
env:
SHA: ${{ steps.sha.outputs.SHA }}
CURRENT_VERSION: ${{ steps.current-version.outputs.CURRENT_VERSION }}

- name: Publish to NPM package registry
run: npm publish --access=public --tag pr-$PR_NUMBER
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGE_REGISTRY_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
2 changes: 1 addition & 1 deletion .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
VERSION=$(npm pkg get version | jq . -r)
npm dist-tag add sats-connect@$VERSION latest
npm dist-tag add @sats-connect/core@$VERSION latest
104 changes: 0 additions & 104 deletions .github/workflows/release-pull-request.yml

This file was deleted.

15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @sats-connect/core
# `@sats-connect/core`

Sats connect is a simple javascript library that connects apps to Bitcoin wallets like Xverse to retrieve user wallet addresses and sign transactions (PSBTs).

[Read the docs](https://docs.xverse.app/sats-connect/)

# Building the `@sats-connect/core` package

To build the `@sats-connect/core` package, run

```bash
npm run build
```

# Docs

[Developer Docs](https://docs.xverse.app/sats-connect/)
1 change: 1 addition & 0 deletions foo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo
Loading
Loading