Skip to content

Commit

Permalink
Merge pull request #30 from tokenbound/bj/fp-29-setup-npm-ci-releases…
Browse files Browse the repository at this point in the history
…-for-sdk

Add GitHub release workflow
  • Loading branch information
bjfresh authored Oct 4, 2023
2 parents 6a6c249 + 38d1dd8 commit 7c51eda
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/on-create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish to NPM

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Set up PNPM
- uses: pnpm/action-setup@v2
with:
version: 8

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'

# Navigate to the specific package directory within the monorepo
- name: Change to package directory
run: cd packages/sdk

- name: Install dependencies and build 🔧
run: pnpm ci && pnpm build

- name: Publish package on NPM 📦
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

0 comments on commit 7c51eda

Please sign in to comment.