Skip to content

Commit

Permalink
Merge pull request #119 from sebamarynissen/feature/github-actions
Browse files Browse the repository at this point in the history
Replace Travis with GitHub actions
  • Loading branch information
keithamus committed Apr 6, 2023
2 parents df9ad8e + 28b41c0 commit c5197e7
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 22 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,26 @@
name: Publish

on:
release:
types: [created]

jobs:
publish-npm:
name: Publish to npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
cache: npm
- run: npm install -g npm@latest
- run: npm i
- run: npm test
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm whoami; npm --ignore-scripts publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,21 @@
name: Node CI

on: [push]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12, 14, 16, 18, 19]
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 i
- run: npm run test.only
env:
CI: true
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

0 comments on commit c5197e7

Please sign in to comment.