Skip to content

Commit

Permalink
chore: prepare next release
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Jun 1, 2020
1 parent f75b935 commit 08ab31f
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 155 deletions.
57 changes: 40 additions & 17 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This is a composition of lint and test scripts
# Make sure to update this file along with the others

name: Test and Release

# Run this job on all pushes and pull requests
Expand All @@ -10,7 +7,10 @@ on:
branches:
- '*'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
# normal versions
- "v[0-9]+.[0-9]+.[0-9]+"
# pre-releases
- "v[0-9]+.[0-9]+.[0-9]+-**"
pull_request: {}

jobs:
Expand All @@ -22,10 +22,12 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [14.x]

steps:
- uses: actions/checkout@v1
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -53,11 +55,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [10.x, 12.x]
node-version: [10.x, 12.x, 14.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v1
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -91,30 +95,49 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
node-version: [14.x]

steps:
- uses: actions/checkout@v1
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Extract the version and commit body from the tag
# The body may be multiline, therefore we need to escape some characters
run: |
VERSION="${{ github.ref }}"
VERSION=${VERSION##*/v}
echo "::set-env name=VERSION::$VERSION"
BODY=$(git show -s --format=%b)
BODY="${BODY//'%'/'%25'}"
BODY="${BODY//$'\n'/'%0A'}"
BODY="${BODY//$'\r'/'%0D'}"
echo "::set-env name=BODY::$BODY"
- name: Install Dependencies
run: npm ci

- name: Create a clean build
run: npm run build

- name: Publish package to npm
run: |
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
npm whoami
npm publish
# Dummy job for skipped builds - without this, github reports the build as failed
skip-ci:
if: contains(github.event.head_commit.message, '[skip ci]')
runs-on: ubuntu-latest
steps:
- name: Skip build
run: echo "Build skipped!"
- name: Create Github Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release v${{ env.VERSION }}
draft: false
# Prerelease versions create prereleases on Github
prerelease: ${{ contains(env.VERSION, '-') }}
body: ${{ env.BODY }}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ The result object `ret` looks as follows:
### __WORK IN PROGRESS__
-->

### __WORK IN PROGRESS__
* Bugfix: Changed the role of RGB states to `level.color.rgb`

### 2.6.2 (2020-04-29)
* Bugfix: The unhandled error handler should now correctly log the error even if `adapter` is not defined

Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 08ab31f

Please sign in to comment.