-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add snapshot serializer to remove ANSII escape codes. * Add npm publish workflow. * Update config. * Update workflow. * Add package-lock.json to repo. Update workflow.
- Loading branch information
Showing
4 changed files
with
11,988 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Manual NPM Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseType: | ||
description: 'Release type - major, minor or patch' | ||
required: true | ||
default: 'patch' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Node version | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10.15.1 | ||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run tests | ||
run: npm test | ||
|
||
build: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Node version | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10.15.1 | ||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build package | ||
run: npm run build | ||
- name: Upload built package | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: compiled-package | ||
path: build/ | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Node version | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10.15.1 | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Download built package | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: compiled-package | ||
- name: Release | ||
run: npm run release:${{github.event.inputs.releaseType}} | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,6 @@ typings/ | |
.next | ||
|
||
build | ||
package-lock.json | ||
|
||
/*.js | ||
!/.eslintrc.js | ||
|
Oops, something went wrong.