-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
26 additions
and
39 deletions.
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 |
---|---|---|
@@ -1,47 +1,23 @@ | ||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | ||
|
||
name: Publish to NPM | ||
|
||
on: | ||
push: | ||
tags: ["v*"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: npm ci | ||
- run: npm test | ||
|
||
publish-npm: | ||
needs: build | ||
runs-on: ubuntu-20.04 | ||
publish: | ||
name: Build and publish to npm | ||
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
# https://github.com/marketplace/actions/checkout | ||
- uses: actions/checkout@v3 | ||
# https://github.com/actions/setup-node | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
node-version: &node-version 16 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
|
||
# publish-gpr: | ||
# needs: build | ||
# runs-on: ubuntu-20.04 | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: actions/setup-node@v1 | ||
# with: | ||
# node-version: 14 | ||
# registry-url: https://npm.pkg.github.com/ | ||
# - run: npm ci | ||
# - run: npm publish | ||
# env: | ||
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_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
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 |
---|---|---|
|
@@ -4,10 +4,17 @@ on: push | |
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# https://github.com/marketplace/actions/checkout | ||
- uses: actions/checkout@v3 | ||
|
||
# https://github.com/actions/setup-node | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
@@ -33,7 +40,8 @@ jobs: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
# https://github.com/codecov/codecov-action | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
fail_ci_if_error: false | ||
files: coverage/clover.xml | ||
|
@@ -43,7 +51,8 @@ jobs: | |
# Repo Settings pane, click Test Coverage in the left sidebar. Find the ID in the | ||
# second section. | ||
- name: Code Climate coverage | ||
uses: paambaati/[email protected] | ||
# https://github.com/paambaati/codeclimate-action | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
|