Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Commit

Permalink
feat: add new github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
zikeji committed Sep 28, 2020
1 parent 7eed818 commit bffc607
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- name: Run eslint
run: npm run test:lint
- name: Run tests & coverage
run: npm run coverage
env:
BOT_TOKEN: "${{ secrets.BOT_TOKEN }}"
- name: Build
run: npm run build --if-present
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "tagged-release"

on:
push:
tags:
- "v*"

jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install dependencies
run: npm ci
- name: Run eslint
run: npm run test:lint
- name: Run tests & coverage
run: npm run coverage
env:
BOT_TOKEN: "${{ secrets.BOT_TOKEN }}"
- name: Build
run: npm run build --if-present
- name: Create Docs
run: npm run docs
- uses: papeloto/action-zip@v1
with:
files: package.json package-lock.json LICENSE dist/ docs/
dest: dist.zip
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
LICENSE
dist.zip

0 comments on commit bffc607

Please sign in to comment.