1
0
mirror of https://github.com/kremalicious/gatsby-plugin-matomo.git synced 2024-12-23 01:29:42 +01:00
gatsby-plugin-matomo/.github/workflows/ci.yml
Matthias Kretschmann 777be77f73
disable GitHub packsge registry publishing
* the new registry-url is not picked up by following publish step
2020-03-22 16:00:01 +01:00

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 }}