Skip to content

feat(throttle): New function #26

feat(throttle): New function

feat(throttle): New function #26

Workflow file for this run

name: "Release, Please!"
on:
push:
branches:
- main
permissions:
packages: write
contents: write
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/-1, lts/*, latest]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build --if-present
- name: Lint
run: npm run lint --if-present
- name: Test
run: npm run test --if-present
please:
needs: test
runs-on: ubuntu-latest
outputs:
released: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
release-type: node
- name: Echo results
run: |
RESULT=$(cat << EOM
${{ toJSON(steps.release.outputs) }}
EOM
)
echo "$RESULT"
publish:
needs: please
if: ${{ needs.please.outputs.released }}
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
steps:
- uses: actions/checkout@v3
- name: Use Latest Node LTS
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: npm
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: npm ci
- name: Build packages
run: npm run build --if-present
- name: Build docs
run: npm run docs --if-present
- name: NPM Publish
run: npm publish