Skip to content

Commit

Permalink
Convert to use github actions (#19)
Browse files Browse the repository at this point in the history
# Thanks for opening a Pull Request

## Changes

Please outline the reason for the changes you are making:

Bring in Github Actions as a CI solution, since the cloud drone offering
seems to no longer be meeting our needs.

Are there any breaking changes you are aware of in the PR?

No

If yes, what are they?


## General Checklist

* [ ] Change is tested locally
* [ ] Demo is updated to exercise change (if applicable)
* [ ] [WIP] flag is removed from the title

[1]:https://docs.npmjs.com/about-semantic-versioning
[2]:https://docs.npmjs.com/cli/deprecate

[3]:https://github.com/meltwater/applet-orchard/blob/master/docs/README.md

---------

Co-authored-by: Joe Theriault <joe.theriault@meltwater.com>
  • Loading branch information
mattquinlan440 and jtheriault authored Aug 10, 2023
1 parent f015139 commit f7d902b
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 53 deletions.
53 changes: 0 additions & 53 deletions .drone.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI test

on: [push]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
35 changes: 35 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 comments on commit f7d902b

Please sign in to comment.