Skip to content

Merge pull request #54 from secretkeylabs/chore/fix-ci-prettier-warnings #43

Merge pull request #54 from secretkeylabs/chore/fix-ci-prettier-warnings

Merge pull request #54 from secretkeylabs/chore/fix-ci-prettier-warnings #43

name: Build and Publish NPM package
on:
push:
branches: [main]
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Set `@secretkeylabs` scope to use GitHub Package Registry for package installation
run: |
echo "@secretkeylabs:registry=https://npm.pkg.github.com/" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${AUTH_TOKEN}" >> .npmrc
env:
AUTH_TOKEN: ${{ secrets.GH_PACKAGE_REGISTRY_TOKEN }}
- name: Install dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_REGISTRY_TOKEN }}
- name: Run build
run: npm run build
- name: Publish to NPM package registry
run: |
echo "@sats-connect:registry=https://registry.npmjs.org/" > .npmrc
echo "//registry.npmjs.org/:_authToken=$AUTH_TOKEN" >> .npmrc
npm publish --access=public
env:
AUTH_TOKEN: ${{ secrets.NPM_PACKAGE_REGISTRY_TOKEN }}