Skip to content

Commit

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

on:
release:
types: [created]

jobs:
publish-npm:
runs-on: ubuntu-latest
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 for JS SDK
run: npm install
working-directory: packages/sdk/js

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

- name: Install dependencies for React components
run: npm install
working-directory: packages/ui/lib

- name: Publish React components to NPM
run: npm publish
working-directory: packages/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
4 changes: 2 additions & 2 deletions 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",
"name": "testalexnsdkjs",
"version": "0.1.1",
"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,5 +1,5 @@
{
"name": "@apeworx/apepay-react",
"name": "testalexnreact",
"version": "0.1.1",
"author": "ApeWorX LTD.",
"license": "Apache-2.0",
Expand Down

0 comments on commit 123b790

Please sign in to comment.