Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update api version #28

Merged
merged 3 commits into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/giant-sloths-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@api-client-sdk-streamline-sample/products-api": patch
"@api-client-sdk-streamline-sample/users-api": patch
---

Update api description
48 changes: 48 additions & 0 deletions .github/workflows/version-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Version Packages

on:
push:
branches:
- main
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
version:
name: Create Version PR
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Create Version PR
id: changesets
uses: changesets/action@v1
with:
version: npm run version-packages
title: "chore: update package versions"
commit: "chore: update package versions"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Print Version Status
run: |
if [[ "${{ steps.changesets.outputs.published }}" == "true" ]]; then
echo "✨ Version updates created"
echo "Updated packages: ${{ steps.changesets.outputs.publishedPackages }}"
else
echo "No version updates needed or PR created"
fi

2 changes: 1 addition & 1 deletion apps/products-api/src/config/swagger.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { version } from '../../package.json';
export const swaggerConfig = new DocumentBuilder()
.setTitle('@api-client-sdk-streamline-sample | Products API')
.setDescription(
'Sample Products API for API client SDK workflow demonstration. Part of [api-client-sdk-streamline-sample](https://github.com/junjie-w/api-client-sdk-streamline-sample) project.',
'Sample Products API for streamlined API client SDK workflow demonstration.\nPart of [api-client-sdk-streamline-sample](https://github.com/junjie-w/api-client-sdk-streamline-sample) project.',
)
.setVersion(version)
.build();
2 changes: 1 addition & 1 deletion apps/users-api/src/config/swagger.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { version } from '../../package.json';
export const swaggerConfig = new DocumentBuilder()
.setTitle('@api-client-sdk-streamline-sample | Users API')
.setDescription(
'Sample Users API for API client SDK workflow demonstration. Part of [api-client-sdk-streamline-sample](https://github.com/junjie-w/api-client-sdk-streamline-sample) project.',
'Sample Users API for streamlined API client SDK workflow demonstration.\nPart of [api-client-sdk-streamline-sample](https://github.com/junjie-w/api-client-sdk-streamline-sample) project.',
)
.setVersion(version)
.build();
Loading