Merge pull request #30 from masx200/dependabot/npm_and_yarn/typescrip… #82
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
npm: | |
name: "Build" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20.12.2 | |
# cache: "yarn" | |
- name: Install dependencies | |
run: npx -y cnpm install | |
- name: Build | |
run: yarn build | |
- name: Test | |
run: yarn test | |
# - name: Publish code coverage | |
# if: endsWith(github.ref, '/main') && github.event_name == 'push' | |
# run: yarn coverage | |
# env: | |
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
- name: Publish to npm | |
if: endsWith(github.ref, '/main') && github.event_name == 'push' | |
run: ./publish.sh ${{ secrets.NPM_AUTH_TOKEN }} |