chore(deps): update dependency @types/node to ^20.16.11 (#283) #286
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: Continuous Delivery | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
Publish: | |
name: Publish Next to npm | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Add TypeScript problem matcher | |
run: echo "::add-matcher::.github/problemMatchers/tsc.json" | |
- name: Use Node.js v20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Install Dependencies | |
run: yarn --frozen-lockfile | |
- name: Bump Version & Publish | |
run: | | |
# Resolve the tag to be used. "next" for push events, "pr-{prNumber}" for dispatch events. | |
TAG=$([[ ${{ github.event_name }} == 'push' ]] && echo 'next' || echo 'pr-${{ github.event.inputs.prNumber }}') | |
# Bump the version | |
yarn standard-version --skip.commit --skip.tag --prerelease "${TAG}.$(git rev-parse --verify --short HEAD)" | |
# Publish to NPM | |
npm publish --tag ${TAG} || true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
Docgen: | |
name: Docgen | |
runs-on: ubuntu-latest | |
if: "github.event_name == 'push'" | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4 | |
- name: Use Node.js v20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Install Dependencies | |
run: yarn --frozen-lockfile | |
- name: Build documentation | |
run: yarn docs | |
- name: Publish Docs | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
run: | | |
REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
echo -e "\n# Checkout the repo in the target branch" | |
TARGET_BRANCH="gh-pages" | |
git clone $REPO out -b $TARGET_BRANCH | |
echo -e "\n# Remove any old files in the out folder" | |
rm -rfv out/assets/* | |
rm -rfv out/interfaces/* | |
rm -rfv out/*.html | |
echo -e "\n# Move the generated docs to the newly-checked-out repo, to be committed and pushed" | |
rsync -vaI LICENSE.md out/ | |
rsync -vaI README.md out/ | |
rsync -vaI docs/ out/ | |
echo -e "\n# Commit and push" | |
cd out | |
git add --all . | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_EMAIL}" | |
git commit -m "docs: api docs build for ${GITHUB_SHA}" || true | |
git push origin $TARGET_BRANCH | |
env: | |
GITHUB_TOKEN: ${{ secrets.SKYRA_TOKEN }} | |
GITHUB_ACTOR: NM-EEA-Y | |
GITHUB_EMAIL: [email protected] |