Skip to content

Commit

Permalink
CI: publish and test CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaaz committed Jan 12, 2020
1 parent 776be79 commit ce8de6d
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: yarn install
- run: yarn test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: Dep install
run: yarn install
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: '@axonteam'
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Dep install
run: yarn install
- name: Configure .npmrc
run: echo registry=https://npm.pkg.github.com/Axonteam >> .npmrc
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
22 changes: 22 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test

on: [push]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: yarn install and lint
run: |
yarn install
yarn test
env:
CI: true

0 comments on commit ce8de6d

Please sign in to comment.