From 3e5c85de9733caad85975f3e6a46801324d68dad Mon Sep 17 00:00:00 2001 From: David Cheung Date: Wed, 7 Sep 2022 17:21:01 -0400 Subject: [PATCH 1/2] gha: publish typescript client instead --- .github/workflows/publish-clients.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-clients.yml b/.github/workflows/publish-clients.yml index 4dad3cb..b395110 100644 --- a/.github/workflows/publish-clients.yml +++ b/.github/workflows/publish-clients.yml @@ -14,14 +14,21 @@ jobs: - name: Generate client run: | - docker run --rm -v ${GITHUB_WORKSPACE}:/local openapitools/openapi-generator-cli generate -i /local/api/notification-service.yaml -g javascript -o /local/client -p projectName="@commitdev/zero-notification-service-client" -p projectDescription="Generated client for zero-notification-service" -p projectVersion="${{ github.event.release.tag_name }}" -p moduleName="NotificationService" + docker run --rm -v ${GITHUB_WORKSPACE}:/local openapitools/openapi-generator:cli-5.3.x \ + generate -i /local/api/notification-service.yaml \ + -g typescript \ + -o /local/client \ + -p projectName="@commitdev/zero-notification-service-client" \ + -p projectDescription="Generated client for zero-notification-service" \ + -p projectVersion="${{ github.event.release.tag_name }}" -p moduleName="NotificationService" sudo chmod -R a+rw ${GITHUB_WORKSPACE} - uses: actions/setup-node@v1 with: - node-version: '12.x' + node-version: '14.x' registry-url: 'https://registry.npmjs.org' - run: cd client; npm install + - run: cd client; npm run build - run: cd client; npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From b9945a0851512cc8bf87e188bcf9a5f9fbbfb38e Mon Sep 17 00:00:00 2001 From: David Cheung Date: Wed, 7 Sep 2022 17:23:24 -0400 Subject: [PATCH 2/2] fixup! gha: publish typescript client instead --- .github/workflows/publish-clients.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-clients.yml b/.github/workflows/publish-clients.yml index b395110..47bfa20 100644 --- a/.github/workflows/publish-clients.yml +++ b/.github/workflows/publish-clients.yml @@ -20,7 +20,8 @@ jobs: -o /local/client \ -p projectName="@commitdev/zero-notification-service-client" \ -p projectDescription="Generated client for zero-notification-service" \ - -p projectVersion="${{ github.event.release.tag_name }}" -p moduleName="NotificationService" + -p projectVersion="${{ github.event.release.tag_name }}" \ + -p moduleName="NotificationService" sudo chmod -R a+rw ${GITHUB_WORKSPACE} - uses: actions/setup-node@v1