Skip to content

πŸ”– Release version 0.6.0 #52

πŸ”– Release version 0.6.0

πŸ”– Release version 0.6.0 #52

Workflow file for this run

name: CI/CD
on: [push]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: '16.x'
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install packages
run: npm ci
- name: Run Tests
run: npm run test:coverage
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: '16.x'
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install packages
run: npm ci
- name: Run Linter
run: npm run lint
build:
name: Build and Publish
runs-on: ubuntu-latest
needs: [test, lint]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
release:
name: Github Release
runs-on: ubuntu-latest
needs: [build]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm install -g @geut/chan
- run: echo "NPM_VERSION=`echo $(node -p "require('./package.json').version")`" >> $GITHUB_ENV
- run: chan gh-release ${{ env.NPM_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}