Skip to content

Commit

Permalink
fix: use github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lshadler committed Sep 27, 2021
1 parent b9e9afc commit 7a92029
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 62 deletions.
46 changes: 0 additions & 46 deletions .circleci/config.yml

This file was deleted.

52 changes: 36 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,46 @@
name: Node.js CI
name: PR Merge Verification

# Controls when the action will run.
on:
push:
branches: [ master ]
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
runs-on: windows-latest
# The type of runner that the job will run on
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x]
node-version: [10.x, 12.x, 14.x, 16.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: yarn install
env:
CI: true
- run: yarn test
env:
CI: true
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: '**/node_modules'
key: ${{ runner.OS }}-node-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-${{ matrix.node-version }}
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint files
run: yarn lint
- name: Test
run: yarn test
- name: Generate assets
run: yarn build
51 changes: 51 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This is a basic workflow to help you get started with Actions

name: Release with Testing

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
release:
# The type of runner that the job will run on
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [15.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: '**/node_modules'
key: ${{ runner.OS }}-node-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-${{ matrix.node-version }}
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Generate assets
run: yarn build
- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
git fetch --tags
yarn semantic-release -e @oclif/semantic-release

0 comments on commit 7a92029

Please sign in to comment.