Skip to content

Commit

Permalink
setup npm automation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisnsns committed Dec 20, 2023
1 parent b9db3fb commit 1953fdd
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish to npm

on:
release:
types: [created]

jobs:
publish-npm:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/sdk/js
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "16"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: npm install

- name: Publish JS SDK to NPM
run: npm publish --workspace=sdk/js
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish React components to NPM
run: npm publish --workspace=ui/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "apepay-js-root",
"type": "module",
"private": true,
"private": false,
"workspaces": [
"sdk/js",
"ui/lib",
Expand Down
2 changes: 1 addition & 1 deletion sdk/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apeworx/apepay",
"version": "0.1.2",
"version": "0.1.3",
"author": "ApeWorX LTD.",
"license": "Apache-2.0",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion ui/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apeworx/apepay-react",
"version": "0.1.1",
"version": "0.1.2",
"author": "ApeWorX LTD.",
"license": "Apache-2.0",
"type": "module",
Expand Down

0 comments on commit 1953fdd

Please sign in to comment.