Skip to content

Commit

Permalink
Merge pull request #58 from IgniteUI/zkolev/use-ga
Browse files Browse the repository at this point in the history
Add github actions ci and publish
  • Loading branch information
Aleksandyr authored Apr 9, 2021
2 parents 050ee5e + 264076f commit 3b4f930
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 23 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/npm-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js CI

on:
push:
branches: [ master, zkolev/use-ga ]
pull_request:
branches: [ master, zkolev/use-ga ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
28 changes: 28 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Deploy

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: 'https://registry.npmjs.org'
- run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- run: echo ${VERSION}
- run: npm ci
- run: npm run build
- run: if [[ ${VERSION} == *"alpha"* || ${VERSION} == *"beta"* || ${VERSION} == *"rc"* ]]; then echo "NPM_TAG=next"; else echo "NPM_TAG=latest"; fi >> $GITHUB_ENV
- run: echo ${NPM_TAG}
- run: npm version ${VERSION} --no-git-tag-version --save --verbose
- run: npm publish --tag ${NPM_TAG}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

0 comments on commit 3b4f930

Please sign in to comment.