Skip to content

Commit

Permalink
chore: add the "Release" GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Ginsburg authored and birtles committed Nov 2, 2021
1 parent 59da9e4 commit 52d97c3
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 7 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
name: CI
on: [push, pull_request]

on:
push:
branches-ignore:
- master
pull_request:
branches:
- master

env:
CI: true
DISPLAY: :99.0
Expand All @@ -11,7 +19,7 @@ jobs:
matrix:
node: ["14", "16"]

name: Run tests on Node ${{ matrix.node }}
name: "Node ${{ matrix.node }} on Linux: Lint and Test"

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -39,10 +47,10 @@ jobs:
firefox --version
- name: Install
run: yarn install
run: yarn install --frozen-lockfile

- name: Lint
run: yarn lint

- name: Run tests
- name: Test
run: yarn test
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

on:
push:
branches:
- master

jobs:
main:
name: Tag Commit and Release to NPM
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.KARMARUNNERBOT_GITHUB_TOKEN }}
HUSKY: 0
steps:
- uses: actions/checkout@v2
with:
token: ${{ env.GITHUB_TOKEN }}
- uses: actions/setup-node@v2
with:
node-version: 14
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn semantic-release
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "karma-firefox-launcher",
"version": "1.3.0",
"version": "2.1.1",
"description": "A Karma plugin. Launcher for Firefox.",
"main": "index.js",
"scripts": {
"lint": "standard",
"test": "karma start --single-run",
"postinstall": "husky install",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
"postpublish": "pinst --enable",
"semantic-release": "semantic-release"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -48,6 +49,7 @@
"Friedel Ziegelmayer <friedel.ziegelmayer@gmail.com>",
"James Talmage <james@talmage.io>",
"Jan Brecka <jan.brecka@gmail.com>",
"Jonathan Ginsburg <jon@than.ml>",
"Liam Newman <lnewman@book.com>",
"Maksim Ryzhikov <rv.maksim@gmail.com>",
"Mario Vejlupek <mario@vejlupek.cz>",
Expand All @@ -64,4 +66,4 @@
"is-wsl": "^2.2.0",
"which": "^2.0.1"
}
}
}

0 comments on commit 52d97c3

Please sign in to comment.