fix(doc): use no external API references (#12) #25
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: Build | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
name: test (${{ matrix.os }}, node-${{ matrix.node }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
node: [18.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.config.node }} | |
- name: Install Dependencies | |
run: npm ci | |
- name: Check Format | |
run: npm run format && git diff --exit-code | |
- name: Check API Documentation | |
run: npm run docs && git diff --exit-code | |
- name: Lint | |
run: npm run lint | |
- name: Test | |
run: npm test | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Release | |
id: release | |
run: npm run release | |
env: | |
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
outputs: | |
release_version: ${{ steps.release.outputs.release_version }} |