Skip to content

Commit

Permalink
ci: update publisher action and hardcode openapi tools version
Browse files Browse the repository at this point in the history
  • Loading branch information
QcFe authored Apr 19, 2024
1 parent 187e0ba commit 70b1770
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/publish-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: OpenAPI Generator Action
uses: kpurdon/openapi-generator-action@v0.0.3
uses: openapi-generators/openapitools-generator-action@v1
with:
args: "generate -i openapi.yaml -g typescript-fetch -o ./client"

- name: Assign client ownership to runner
run: sudo chown -R runner client

generator: typescript-fetch
openapi-file: openapi.yaml
generator-tag: v7.4.0
# generates into <generator>-client
- id: get_version
uses: battila7/[email protected]

- name: Generate package.json
env:
TAG_VERSION: ${{ steps.get_version.outputs.version-without-v }}
working-directory: ./client
working-directory: ./typescript-fetch-client
run: |
cat <<EOF > package.json
{
Expand All @@ -53,12 +53,12 @@ jobs:
EOF
- name: Setup Node.js environment
uses: actions/setup-node@v3.4.1
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
registry-url: 'https://npm.pkg.github.com'

- run: npm publish
working-directory: ./client
working-directory: ./typescript-fetch-client
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 70b1770

Please sign in to comment.