Skip to content

doc: add git repo

doc: add git repo #24

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "20.2.0"
- name: Install dependencies
working-directory: ./lib
run: |
npm ci
npm run ropm-ci
npm run validate
npm-release:
#only run this task for version-tagged releases
if: startsWith(github.ref, 'refs/tags/v')
needs: ci
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Set Release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "20.2.0"
- name: Copy README and LICENSE
run: cp README.md LICENSE lib
- name: Publish to npm
working-directory: ./lib
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
npm version ${{env.RELEASE_VERSION}} --no-git-tag-version
npm publish --access public