EscolaLMS/sdk

View on GitHub
.github/workflows/generate.yaml

Summary

Maintainability
Test Coverage

name: Publish Package to npmjs
on:
  release:
    types: [created]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with: 
          ref: 'main'
      # Setup .npmrc file to publish to npm
      - uses: actions/setup-node@v2
        with:
          node-version: "16.x"
          registry-url: "https://registry.npmjs.org"
      - run: git config --global user.email "github@escolalms.com" &&   git config --global user.name "Github"
      - run: npm i 
      - run: npm run lib      
      - run: npm version ${{github.ref_name}}
      - run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
          
      - run: git push