Schopp/fixed fetch #40
Workflow file for this run
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: node-jet CI | |
env: | |
NODE_VERSION: '20.8' | |
on: | |
release: | |
types: [created] | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- run: npm ci | |
- run: npm run ci:eslint | |
- run: npm run ci:prettier | |
- run: npm run ci:type-check | |
- run: npm test | |
publish-npm: | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: https://registry.npmjs.org/ | |
- run: npm ci | |
- run: git config --global user.email "schopp@hbkworld.com" | |
- run: git config --global user.name "Florian Schopp" | |
- run: npm version ${{ env.RELEASE_VERSION }} | |
- run: npm run build | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |