Skip to content

Commit

Permalink
chore: hello github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
0b5vr committed Feb 12, 2022
1 parent 4ed8f0a commit 0e2e47f
Show file tree
Hide file tree
Showing 7 changed files with 187 additions and 220 deletions.
202 changes: 0 additions & 202 deletions .circleci/config.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/actions/init/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Init

runs:
using: 'composite'
steps:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Cache Deps
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles( 'yarn.lock' ) }}
restore-keys: |
${{ runner.os }}-yarn-
28 changes: 28 additions & 0 deletions .github/workflows/deploy-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy Nightly

on:
schedule:
- cron: '0 0 * * *'

defaults:
run:
shell: bash

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: dev
- name: Init Stuff
uses: ./.github/actions/init
- name: Fetch Deps
run: yarn install --frozen-lockfile
- name: Create Nightly Version
run: npm version $(node ./bin/gen-nightly-version.js)
- name: Publish
run: npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy Release

on:
push:
tags:
- v*

defaults:
run:
shell: bash

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init Stuff
uses: ./.github/actions/init
- name: Fetch Deps
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
116 changes: 116 additions & 0 deletions .github/workflows/inspect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Inspect

on: push

defaults:
run:
shell: bash

jobs:
fetch:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init Stuff
uses: ./.github/actions/init
- name: Fetch Deps
run: yarn install --frozen-lockfile

lint:
runs-on: ubuntu-latest
needs: fetch
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init Stuff
uses: ./.github/actions/init
- name: Lint
run: yarn lint

test:
runs-on: ubuntu-latest
needs: fetch
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init Stuff
uses: ./.github/actions/init
- name: Lint
run: yarn test --coverage
- name: Upload Coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: |
coverage/
build:
runs-on: ubuntu-latest
needs: fetch
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init Stuff
uses: ./.github/actions/init
- name: Build
run: yarn build
- name: Upload Coverage
uses: actions/upload-artifact@v2
with:
name: build
path: |
dist/
ts*/
types/
docs:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init Stuff
uses: ./.github/actions/init
- name: Download Builds
uses: actions/download-artifact@v2
with:
name: build
- name: Build Docs
run: yarn docs
- name: Upload Coverage
uses: actions/upload-artifact@v2
with:
name: docs
path: |
docs/
gh-pages:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/release' }}
needs:
- build
- docs
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init Stuff
uses: ./.github/actions/init
- name: Download Builds
uses: actions/download-artifact@v2
with:
name: build
path: public
- name: Download Docs
uses: actions/download-artifact@v2
with:
name: docs
path: public/docs
- name: Copy Examples
run: |
cp -r examples public/examples
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: public
File renamed without changes.
Loading

0 comments on commit 0e2e47f

Please sign in to comment.