Skip to content

Updated GH workflow and notes #1

Updated GH workflow and notes

Updated GH workflow and notes #1

Workflow file for this run

name: Generate SDKs
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
on:
push:
branches: [ main ]
jobs:
generate:
name: Generate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Install APIMatic CLI
run: npm install -g @apimatic/cli
- name: Generate Typescript SDK
run: apimatic sdk:generate --destination=sdks/ts --platform TYPESCRIPT --file=openapi.yaml
- name: Set publishing coordiates
run: jq -r -s '.[0] * .[1]' package.json package-patch.json > tmp.json && mv -f tmp.json package.json
- name: Authenticate with private NPM package
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
- name: Install project dependencies
run: npm ci
- name: Publish to GitHub Packages NPM
run: npm publish --scope=wiremock-inc --registry=https://npm.pkg.github.com