Skip to content

feat: support http verb 'head' #789

feat: support http verb 'head'

feat: support http verb 'head' #789

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v4
id: yarn-cache
with:
path: .yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: corepack enable
- run: yarn --immutable
- run: yarn ci-build
- run: yarn ci-test
- run: yarn ci-lint
- run: yarn integration:generate
- run: yarn integration:validate
- run: yarn workspace e2e clean
- run: yarn workspace e2e generate
- run: yarn workspace e2e build
- run: yarn workspace e2e test
- name: Check for uncommitted changes
run: ./scripts/assert-clean-working-directory.sh
- name: Publish documentation
if: github.ref == 'refs/heads/main'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
yarn lerna run publish:gh-pages --scope '@nahkies/openapi-code-generator-documentation'
# TODO: figure out how to do this safely, eg: no risk of external contributors exfiltrating publish secret.
# - name: Configure Git User
# run: |
# git config --global user.email "[email protected]"
# git config --global user.name "$GITHUB_ACTOR"
#
# - name: Check if able to publish changes
# run: npm whoami
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
#
# - name: Publish to NPM
# run: echo 'publish release' #yarn lerna publish --no-private --force-publish --yes --conventional-commits
# if: github.ref == 'refs/heads/main'
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
#
# - name: Publish to NPM (Alpha)
# run: echo 'publish alpha release' #yarn lerna publish --no-private --force-publish --yes --conventional-commits --canary
# if: github.ref != 'refs/heads/main'
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}