Skip to content

Commit

Permalink
Merge pull request #2 from anno-ai/devel
Browse files Browse the repository at this point in the history
feat(package json): update url, add github workflow
  • Loading branch information
andy-hayes1 authored Sep 3, 2020
2 parents 7bfb76b + 68aeccd commit 0d099ac
Show file tree
Hide file tree
Showing 5 changed files with 3,638 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/node-js-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js Unit Tests

on:
push:
branches: [ devel ]
pull_request:
branches: [ devel ]

jobs:
build:

runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Setup npmrc
run: echo "" >> .npmrc && echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> .npmrc
- run: npm ci
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run build --if-present
52 changes: 52 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Semantic Release

on:
push:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

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

steps:
- name: Git Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Setup npmrc
run: echo "" >> .npmrc && echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> .npmrc

- run: npm ci
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm run build --if-present

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17.1.1
id: semantic # Need an `id` for output variables
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Do something when a new release published
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo ${{ steps.semantic.outputs.new_release_version }}
echo ${{ steps.semantic.outputs.new_release_major_version }}
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
node_modules
.tmp
npm-debug.log
package-lock.json
package-lock.*
.waterline
.node_history

Expand Down
Loading

0 comments on commit 0d099ac

Please sign in to comment.