feat(refactor): rewrite to a single queue-based pager #8
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
name: Node build, test and publish | |
on: | |
pull_request: | |
types: [assigned, opened, synchronize, reopened] | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cleanup stale actions | |
uses: styfle/cancel-workflow-action@0.11.0 | |
with: | |
access_token: ${{ github.token }} | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: npm install, lint, build, and test | |
run: | | |
yarn install --immutable | |
yarn lint | |
yarn build | |
yarn test | |
env: | |
CI: true | |
publish-npm: | |
needs: build | |
if: github.ref == 'refs/heads/main' | |
permissions: | |
contents: write | |
issues: write | |
id-token: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: yarn | |
- run: yarn install --immutable | |
- run: yarn build | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.SESAMECARE_OSS_NPM_TOKEN }} | |
run: | | |
yarn dlx semantic-release |