Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Hello World"
description: "Greet someone and record the time"
inputs:
who-to-greet: # id of input
description: "Who to greet"
required: true
default: "World"
outputs:
time: # id of output
description: "The time we greeted you"
runs:
using: "node14"
main: "../../tools/github-action-publish.js"
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ master ]
branches: [main]
pull_request:
branches: [ master ]
branches: [main]

jobs:
build:
Expand All @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [8.x, 10.x, 12.x, 14.x]
node-version: [10.x, 12.x, 14.x, 15.x]
steps:
- uses: actions/checkout@master
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -23,7 +23,8 @@ jobs:
- name: build, test, generate coverage
run: |
npm ci
npm test
npm run build
npm run test
env:
CI: true
- name: coveralls
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: npm-publish
on:
workflow_dispatch:
inputs:
versionSdk:
description: "Bump which version number? (major, minor, patch)"
required: true
default: "patch"

jobs:
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 14
- name: Publish if version has been updated
uses: ./.github/publish
id: hello
with:
who-to-greet: "Mona the Octocat"
env: # More info about the environment variables in the README
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated
NPM_AUTH_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }} # This will be shared with your repo as an org secret
NPM_AUTH: ${{ secrets.ADOBE_BOT_NPM_TOKEN }} # This will be shared with your repo as an org secret
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# Adobe Target Node.js SDK

[![npm](https://img.shields.io/npm/v/@adobe/target-nodejs-sdk)](https://www.npmjs.com/package/@adobe/target-nodejs-sdk)
[![npm](https://img.shields.io/npm/dm/@adobe/target-nodejs-sdk)](https://www.npmjs.com/package/@adobe/target-nodejs-sdk)
[![build](https://github.com/adobe/target-nodejs-sdk/workflows/CI/badge.svg)](https://github.com/adobe/target-nodejs-sdk/actions)
[![coveralls](https://img.shields.io/coveralls/github/adobe/target-nodejs-sdk)](https://coveralls.io/github/adobe/target-nodejs-sdk?branch=HEAD)
[![license](https://img.shields.io/npm/l/@adobe/target-nodejs-sdk.svg)](https://github.com/adobe/target-nodejs-sdk/blob/master/LICENSE)
[![license](https://img.shields.io/npm/l/@adobe/target-nodejs-sdk.svg)](https://github.com/adobe/target-nodejs-sdk/blob/main/LICENSE)

The Adobe Target Node.js SDK uses the [Target Delivery API] to retrieve and deliver personalized experiences.
Furthermore, the Node.js SDK helps manage integrations with Experience Cloud solutions using the [Experience Cloud Identity](https://docs.adobe.com/content/help/en/id-service/using/intro/overview.html)
library (ECID).

## Table of Contents

* [Getting started](#getting-started)
+ [Prerequisites](#prerequisites)
+ [Installation](#installation)
+ [Super Simple to Use](#super-simple-to-use)
* [Development](#development)
* [Additional code](#additional-code)
- [Getting started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Super Simple to Use](#super-simple-to-use)
- [Development](#development)
- [Additional code](#additional-code)

## Getting started

Expand All @@ -26,9 +27,10 @@ All currently maintained versions of Node.js are supported (including LTS versio
[Node.js Releases](https://en.wikipedia.org/wiki/Node.js#Releases).
Older Node.js releases may likely work too, but are not officially supported.

### Installation
### Installation

To get started with Target Node.js SDK, just add it as a dependency by installing from NPM:

```bash
npm i @adobe/target-nodejs-sdk -P
```
Expand All @@ -43,7 +45,7 @@ Check out our [Contribution guidelines](../../.github/CONTRIBUTING.md) as well a
to contributing to Target Node.js SDK development.
To build the project: `npm run build`
To run the unit tests: `npm test`
To generate code coverage after running the tests: `npm run coverage`
To generate code coverage after running the tests: `npm run coverage`

## Additional code

Expand All @@ -55,10 +57,10 @@ Production dependencies include:
"version": "2.0.0",
"license": "Adobe Proprietary license"
},
"request": {
"version": "2.88.0",
"license": "Apache-2.0",
"repository": "https://github.com/request/request"
"node-fetch": {
"version": "2.6.1",
"license": "MIT",
"repository": "https://github.com/node-fetch/node-fetch"
}
}
```
Expand All @@ -67,4 +69,4 @@ Production dependencies include:

[back to top](#table-of-contents)

[Target Delivery API]: https://developers.adobetarget.com/api/delivery-api/
[target delivery api]: https://developers.adobetarget.com/api/delivery-api/
8 changes: 3 additions & 5 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"packages": [
"packages/*"
],
"packages": ["packages/*"],
"command": {
"version": {
"allowBranch": "master"
"allowBranch": "main"
},
"publish": {
"allowBranch": "master"
"allowBranch": "main"
}
},
"version": "independent"
Expand Down
Loading