1.0.98 • Published 2 years ago

@novorender/devops-test-node-lib v1.0.98

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

build publish

Node Library

A sample node library with CI.

Installation

  1. Create a .npmrc file in the user folder. Add the following 2 lines of code, replace "personal-access-token" with a token that has read permission to the package.
    @novorender:registry=https://npm.pkg.github.com/
    //npm.pkg.github.com/:_authToken="personal-access-token"
  2. Install
    1. Latest version.
      $ npm i devops-test-node-lib
    2. Specific version.
      $ npm i devops-test-node-lib@1.0.1
    3. Next/Pre-Release version.
      $ npm i devops-test-node-lib@next

Usage

Include this line in the file that you want to use the library

import { hello } from "@novorender/devops-test-node-lib";

Test

Clone the repository to a local directory

$ git clone https://github.com/novorender/devops-test-node-lib
$ cd devops-test-node-lib

Run the tests

$ npm i
$ npm test

Continuous Integration (CI)

  1. On every commit/push to the main branch:
    1. Code is built.
    2. Unit tests are run. If the tests fail, the GitHub actions aborts and you can see the workflow details under actions.
    3. Code coverage check is done.
  2. On every commit/push to the main branch with a version tag:
    1. Code is built.
    2. Unit tests are run. If the tests fail, the GitHub actions aborts and you can see the workflow details under actions.
    3. Code coverage check is done.
    4. A new package is published to github packages.
  3. Provides the ability to publish to npm registry (public). You will need to create a release, please go to Publishing.

Versioning

When you ready with your changes and want to publish a new package, then you can release a Major/Minor/Patch version. In order to do that, run the following set of commands

Bump Version

$ npm version [major | minor | patch | prerelease]

If current version is 1.0.1, then the following applies 1. major changes the version to 2.0.0 2. minor changes the version to 1.1.0 3. patch changes the version to 1.0.2 4. prerelease changes the version to 1.0.2-0

Push Version to Main Branch

$ git push

Publishing

When you are ready to release to the public domain, then follow the below to do so. 1. Navigate to the repository. 2. Click on "Releases" link below the "About" block. 3. Click on "Draft a new release". 4. Choose a tag (generally this will be the last tag that was created when you issued the npm version command). 5. Click on "Publish release". All packages are released to the public npm registry. 6. Navigate to registry npm.
7. Enter "@novorender/devops-test-node-lib" in the search bar and press enter. 8. The package page should be diplayed. 9. Confirm that the latest version is the one that you released.

Licensing

MIT

1.0.98

2 years ago

1.0.95

2 years ago

1.0.93

2 years ago

1.0.92

2 years ago

1.0.91

2 years ago

1.0.90

2 years ago

1.0.88

2 years ago

1.0.87

2 years ago

1.0.86

2 years ago

1.0.85

2 years ago

1.0.84

2 years ago

1.0.83

2 years ago

1.0.82

2 years ago

1.0.80

2 years ago

1.0.79

2 years ago

1.0.78

2 years ago

1.0.73

2 years ago

1.0.72

2 years ago