Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up npm automation #89

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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
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
Loading