Skip to content

chore: add "debug-change" to test workflow #3

chore: add "debug-change" to test workflow

chore: add "debug-change" to test workflow #3

name: Update API client (dev)
on:
workflow_dispatch:
push:
branches:
- dev
paths:
- packages/mittwald/spec/openapi-dev.json
jobs:
update-client:
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PUBLISH_PAT: ${{ secrets.PUBLISH_PAT }}
GH_TOKEN: ${{ secrets.PUBLISH_PAT }}
steps:
- name: Checkout ⬇️
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PUBLISH_PAT }}
- name: Git Identity 🪪
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Yarn Install 📦️
run: yarn install --immutable
- name: Setup NX 1/2 🎛️
uses: nrwl/nx-set-shas@v4
- name: Setup NX 2/2 🎛
if: github.ref != 'refs/heads/dev'
run: git branch --track master origin/dev
- name: Merge in master ⛙
run: |
git merge refs/heads/master --strategy-option theirs
- name: Update OpenAPI ⬇️
if: github.ref == 'refs/heads/dev'
run: |
yarn nx run @mittwald/api-client:build:client-dev
if [ $(git status --porcelain . | wc -l) -gt 0 ] ; then
git add .
yarn test
git commit -m "chore: update generated development client";
git push origin
fi