Skip to content

Commit

Permalink
feat: add npm-publish github workflow (#68)
Browse files Browse the repository at this point in the history
Co-authored-by: Norbert Nader <nnader@amazon.com>
  • Loading branch information
NorbertNader and NorbertNader committed Feb 25, 2022
1 parent ac16b08 commit 1d14361
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 10 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: NPM Publish
on:
push:
branches:
- main
jobs:
publish-to-npm:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'

- name: Install and Build
run: |
yarn install
yarn build
- name: Publish
run: yarn run publishToNpm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
"test:eslint": "eslint --ext .js,.ts,.tsx . --max-warnings 0",
"test:unit": "lerna run test --stream --concurrency 1",
"test:git": "git diff --exit-code",
"pack": "lerna run pack"
"pack": "lerna run pack",
"versionup:auto": "lerna version --conventional-commits --no-push --no-git-tag-version --yes",
"versionup:patch": "lerna version patch --conventional-commits --no-push --no-git-tag-version --yes",
"versionup:minor": "lerna version minor --conventional-commits --no-push --no-git-tag-version --yes",
"versionup:major": "lerna version major --conventional-commits --no-push --no-git-tag-version --yes",
"publishToNpm": "lerna publish from-package --no-verify-access --yes"
},
"devDependencies": {
"@babel/core": "^7.6.4",
Expand Down
1 change: 1 addition & 0 deletions packages/components/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ addChartCommands();
addMatchImageSnapshotCommand({
failureThreshold: 0.025,
failureThresholdType: 'percent',
customDiffConfig: { threshold: 0.2 },
});
1 change: 1 addition & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"private": true,
"name": "@iot-app-kit/components",
"version": "0.0.1",
"description": "IoT App Kit Components",
Expand Down
4 changes: 1 addition & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{
"private": true,
"name": "@iot-app-kit/core",
"license": "Apache-2.0",
"version": "0.0.1",
"description": "IoT Application Kit core",
"main": "./dist/index.cj.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"publishConfig": {
"access": "public"
},
"files": [
"dist/"
],
Expand Down
1 change: 1 addition & 0 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"private": true,
"name": "@iot-app-kit/react-components",
"license": "Apache-2.0",
"sideEffects": false,
Expand Down
4 changes: 1 addition & 3 deletions packages/related-table/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"private": true,
"name": "@iot-app-kit/related-table",
"version": "1.0.0",
"description": "IoT Application Kit - Related Table component",
Expand All @@ -7,9 +8,6 @@
"types": "dist/index.d.ts",
"module": "dist/index.module.js",
"source": "src/index.ts",
"publishConfig": {
"access": "public"
},
"files": [
"dist",
"src"
Expand Down
4 changes: 1 addition & 3 deletions packages/source-iotsitewise/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"private": true,
"name": "@iot-app-kit/source-iotsitewise",
"version": "0.0.1",
"description": "AWS IoT SiteWise source for IoT Application Kit",
Expand All @@ -14,9 +15,6 @@
"files": [
"dist/"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/awslabs/iot-app-kit.git"
Expand Down

0 comments on commit 1d14361

Please sign in to comment.