Skip to content

Commit c256c12

Browse files
committed
ci: add some comments to the actions
1 parent 3a86d10 commit c256c12

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

build-client/action.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,23 @@ runs:
3939
tail ${OPENAPI_FILE}
4040
cat ${OPENAPI_FILE} | wc -l
4141
shell: bash
42+
# Merge the client package.json with the package.json from here, the result is written to package.json.tmp
4243
- run: jq -s '.[0] * .[1]' ./package.json ./client/package.json | tee package.json.tmp
4344
shell: bash
45+
# This temp file is then used to create the new package.json
46+
# This needs to be done in a separate step as to not read and write to the same file in one step
4447
- run: mv package.json.tmp package.json
4548
shell: bash
49+
# Install dependencies
4650
- run: pnpm install
4751
shell: bash
52+
# Generate the orval config by replacing the placeholders in the orval.config.ts file
4853
- run: |
4954
sed -i s/'ORVAL_API_NAME'/'"'${{ inputs.API_NAME }}'"'/ orval.config.ts
5055
sed -i s/'API_TARGET_NAME'/''${{ inputs.API_TARGET_NAME }}''/ orval.config.ts
5156
sed -i s/'API_TARGET_NAME'/${{ inputs.API_TARGET_NAME }}/ src/index.ts
5257
shell: bash
58+
# Run orval and tsup to build the client
5359
- run: |
5460
pnpm orval
5561
pnpm build

publish-client/action.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@ author: 'Oliver Dudgeon'
55
runs:
66
using: 'composite'
77
steps:
8+
# Set the NPm token for authentication
89
- name: NPM Config
910
run: pnpm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
1011
env:
1112
NPM_TOKEN: ${{ env.NODE_AUTH_TOKEN }}
1213
shell: bash
14+
# Install semver which is ued to validate the input tag
1315
- name: Install Semver CLI
1416
run: pnpm i -g semver
1517
shell: bash
18+
# Merge the release config into the package.json
1619
- name: Prepare package.json
1720
run: |
1821
jq -s '.[0] * .[1]' package.json package.release.json | tee dist/package.json
1922
shell: bash
23+
# Copy the required files to the dist directory which we publish
2024
- name: Prepare Build
2125
run: |
2226
cp client/README.md dist/README.md

0 commit comments

Comments
 (0)