Skip to content

Commit ad24b6a

Browse files
committed
fix: pipeline
Signed-off-by: QcFe <10742159+QcFe@users.noreply.github.com>
1 parent 49b42c6 commit ad24b6a

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
checks:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818

1919
- name: Setup Node.js
2020
uses: actions/setup-node@v6

.github/workflows/publish-client.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ permissions:
2525

2626
jobs:
2727
publish:
28+
name: Publish client
2829
runs-on: ubuntu-latest
2930
steps:
30-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@v6
3132

3233
- name: Detect client and version
3334
id: detect
@@ -37,6 +38,7 @@ jobs:
3738
echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
3839
else
3940
echo "client=${GITHUB_REF_NAME%%-v*}" >> $GITHUB_OUTPUT
41+
echo "version=${GITHUB_REF_NAME##*-v}" >> $GITHUB_OUTPUT
4042
fi
4143
4244
- name: Setup Node.js
@@ -51,20 +53,23 @@ jobs:
5153
distribution: "corretto"
5254
java-version: "17"
5355

54-
- id: get_version
55-
uses: battila7/get-version-action@v2.2.1
56-
57-
- name: Generate the client
56+
- name: Prepare versioned openapi
5857
env:
59-
TAG_VERSION: ${{ steps.detect.outputs.version || steps.get_version.outputs.version-without-v }}
58+
TAG_VERSION: ${{ steps.detect.outputs.version }}
6059
CLIENT: ${{ steps.detect.outputs.client }}
6160
run: |
6261
echo "const version = \"$TAG_VERSION\";" > src/clients/$CLIENT/version.tsp
6362
npm install
64-
npm run build -- $CLIENT
63+
npm run compile -- $CLIENT
64+
65+
- name: Generate the client
66+
env:
67+
CLIENT: ${{ steps.detect.outputs.client }}
68+
run: |
69+
npm run generate -- $CLIENT
6570
6671
- name: Publish the client
6772
run: npm publish
68-
working-directory: ./dist/${{ steps.detect.outputs.client }}/client
73+
working-directory: ./dist/clients/${{ steps.detect.outputs.client }}/client
6974
env:
7075
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
dist/client
3+
dist/clients

0 commit comments

Comments
 (0)