setup some CI and basics (#47)

This commit is contained in:
Romain Beaumont 2021-03-14 00:49:17 +01:00 committed by GitHub
commit 99cce3b371
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 70 additions and 0 deletions

25
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,25 @@
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
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 install
- run: npm test

32
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: npm-publish
on:
push:
branches:
- master # Change this to your default branch
jobs:
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 14.0.0
- id: publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Create Release
if: steps.publish.outputs.type != 'none'
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.publish.outputs.version }}
release_name: Release ${{ steps.publish.outputs.version }}
body: ${{ steps.publish.outputs.version }}
draft: false
prerelease: false

4
.gitpod Normal file
View file

@ -0,0 +1,4 @@
image:
file: .gitpod.DockerFile
tasks:
- command: npm install

8
.gitpod.DockerFile Normal file
View file

@ -0,0 +1,8 @@
FROM gitpod/workspace-full:latest
RUN bash -c ". .nvm/nvm.sh \
&& nvm install 14 \
&& nvm use 14 \
&& nvm alias default 14"
RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix

1
.npmrc Normal file
View file

@ -0,0 +1 @@
package-lock=false