Lang sr fix test #243
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: "Test and publish on main" | |
on: | |
push: | |
branches: | |
- "main" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-d4-${{ hashFiles('**/package-lock.json') }} | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.cypress | |
key: ${{ runner.os }}-cypress | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- run: npm ci | |
env: | |
CI: true | |
CYPRESS_CACHE_FOLDER: '~/.cypress' | |
- run: npm run lint | |
- run: npm test | |
env: | |
CYPRESS_CACHE_FOLDER: '~/.cypress' | |
publish-npm: | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-d4-${{ hashFiles('**/package-lock.json') }} | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.cypress | |
key: ${{ runner.os }}-cypress | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org | |
- name: "Automated Version Bump" | |
uses: "phips28/gh-action-bump-version@master" | |
with: | |
tag-prefix: 'd4-' | |
- run: npm ci | |
env: | |
CI: true | |
CYPRESS_CACHE_FOLDER: '~/.cypress' | |
- name: Publish to NPM registry | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |