This repository has been archived by the owner on Nov 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change cicd to match other packages for simple releases.
- Loading branch information
Showing
4 changed files
with
117 additions
and
46 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: build | ||
on: | ||
push: | ||
|
||
jobs: | ||
build: | ||
timeout-minutes: 15 | ||
env: | ||
CI: true | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [12.x, 14.x, 16.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
- name: Use NPM 8 | ||
run: npm i -g npm@8 | ||
- run: npm ci | ||
- name: build | ||
run: npm run build | ||
- name: test | ||
id: test | ||
if: ${{ always() }} | ||
run: npm run test | ||
- name: lint | ||
if: ${{ always() }} | ||
run: npm run lint | ||
- name: style | ||
if: ${{ always() }} | ||
run: npm run format:check | ||
|
||
codecov: # Send only a single coverage report per run | ||
needs: build | ||
timeout-minutes: 15 | ||
env: | ||
CI: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js lts | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: lts/* | ||
cache: npm | ||
- run: npm ci | ||
- name: test | ||
run: npm run test -- --coverage | ||
- name: codecov | ||
uses: codecov/codecov-action@v2 |
This file was deleted.
Oops, something went wrong.
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,57 @@ | ||
name: release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: choice | ||
description: Version number to increment | ||
required: true | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
|
||
jobs: | ||
release: | ||
env: | ||
CI: true | ||
GITHUB_TOKEN: ${{ secrets.ACTION_GITHUB_TOKEN }} | ||
NPM_OTP_TOKEN: ${{ github.event.inputs.otp }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Need history for changelog generation | ||
- name: Use Node.js lts | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: lts/* | ||
registry-url: https://registry.npmjs.org | ||
- run: npm ci | ||
- name: build | ||
run: npm run build | ||
- name: test | ||
id: test | ||
if: ${{ always() }} | ||
run: npm run test -- --coverage | ||
- name: lint | ||
if: ${{ always() }} | ||
run: npm run lint | ||
- name: style | ||
if: ${{ always() }} | ||
run: npm run format:check | ||
- name: npm auth | ||
run: npm set "//registry.npmjs.org/:_authToken" ${{ env.NPM_TOKEN }} | ||
- name: config git user | ||
run: | | ||
git config --global user.name ${{ secrets.ACTION_GITHUB_USERNAME }}; | ||
git config --global user.email ${{ secrets.ACTION_GITHUB_EMAIL }}; | ||
- name: perform release | ||
run: | | ||
npm run release -- \ | ||
${{ github.event.inputs.version }} \ | ||
--ci | ||
- name: codecov # Perform after version publishing | ||
if: steps.test.outcome == 'success' | ||
uses: codecov/codecov-action@v2 |
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