Skip to content

Commit

Permalink
chore(MPC-2011): add ci tests and build
Browse files Browse the repository at this point in the history
  • Loading branch information
MnrGreg committed Nov 1, 2024
1 parent 827327f commit 2a4cd60
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Publish NPM Package

on:
push:
branches:
- main
# Publish semver tags as releases.
tags: ["v*.*.*"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '22'

- name: Install dependencies
run: npm install

- name: Add @sepior/tsmsdkv2 Typescript Definitions
run: cp ./types/* ./node_modules/@sepior/tsmsdkv2/

- name: Build TypeScript application
run: npm run build

- name: Publish to GitHub npm package registry
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: npm publish --registry=https://npm.pkg.github.com/OWNER
28 changes: 28 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run Tests

on:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '22'

- name: Install dependencies
run: npm install

- name: Add @sepior/tsmsdkv2 Typescript Definitions
run: cp ./types/* ./node_modules/@sepior/tsmsdkv2/

- name: Run tests
run: npm test
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"name": "@blockdaemon/buildervault-web3-provider",
"version": "0.0.1",
"description": "EIP-1193 Compatible Ethereum provider for BuilderVault",
"repository": "github:blockdaemon/buildervault-web3-provider",
"repository": "https://github.com/blockdaemon/buildervault-web3-provider.git",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"author": "BuilderVault",
"license": "MIT",
"main": "dist/src/index.js",
Expand Down

0 comments on commit 2a4cd60

Please sign in to comment.