mirror of
https://github.com/kremalicious/gatsby-plugin-matomo.git
synced 2024-12-23 01:29:42 +01:00
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: 'CI/CD Pipeline'
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '13.x'
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node
|
|
|
|
- run: npm install
|
|
- name: Run tests & publish code coverage
|
|
uses: paambaati/codeclimate-action@v2.4.0
|
|
with:
|
|
coverageCommand: npm test
|
|
env:
|
|
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
|
|
|
publish:
|
|
needs: test
|
|
if: success() && startsWith(github.ref, 'refs/tags')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '13.x'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- run: npm install
|
|
- run: npm publish
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
# - uses: actions/setup-node@v1
|
|
# with:
|
|
# node-version: '13.x'
|
|
# registry-url: 'https://npm.pkg.github.com'
|
|
# - run: npm publish
|
|
# env:
|
|
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|