Skip to content

Commit 0e2ba4c

Browse files
committed
feat: update uploda
2 parents 15c4aa6 + b22f726 commit 0e2ba4c

2 files changed

Lines changed: 28 additions & 19 deletions

File tree

.github/workflows/deploy-openapi-assets.yml

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,27 +96,36 @@ jobs:
9696
echo "pack_path=$PACK_PATH" >> "$GITHUB_OUTPUT"
9797
echo "latest_path=$LATEST_PATH" >> "$GITHUB_OUTPUT"
9898
99-
- name: Create or update tagged release and upload versioned tarball
100-
id: gh_release_tag
101-
uses: softprops/action-gh-release@v1
102-
with:
103-
tag_name: "openapi-v${{ needs.pack.outputs.version }}"
104-
name: "OpenAPI v${{ needs.pack.outputs.version }}"
105-
body: "Automated release for packages/openapi (pack + upload)"
106-
files: ${{ steps.find.outputs.pack_path }}
99+
- name: Ensure GH CLI available
100+
run: gh --version || (echo "gh not installed" && exit 1)
101+
102+
- name: Upload versioned asset (replace if exists)
107103
env:
108-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105+
run: |
106+
TAG="openapi-v${{ needs.pack.outputs.version }}"
107+
ASSET="artifacts/${{ needs.pack.outputs.packfile_name }}"
109108
110-
- name: Create or update 'latest' release and upload stable tarball
111-
id: gh_release_latest
112-
uses: softprops/action-gh-release@v1
113-
with:
114-
tag_name: "openapi-latest"
115-
name: "OpenAPI"
116-
body: "Automated release for packages/openapi (latest)"
117-
files: ${{ steps.find.outputs.latest_path }}
109+
# create release if missing
110+
if ! gh release view "$TAG" >/dev/null 2>&1; then
111+
gh release create "$TAG" --title "OpenAPI v${{ needs.pack.outputs.version }}" --notes "Automated release"
112+
fi
113+
114+
# upload and overwrite existing asset with same name
115+
gh release upload "$TAG" "$ASSET" --clobber
116+
117+
- name: Upload latest asset (replace if exists)
118118
env:
119-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
120+
run: |
121+
LATEST_TAG="openapi-latest"
122+
LATEST_ASSET="artifacts/openapi-latest.tgz"
123+
124+
if ! gh release view "$LATEST_TAG" >/dev/null 2>&1; then
125+
gh release create "$LATEST_TAG" --title "OpenAPI (latest)" --notes "Automated latest release"
126+
fi
127+
128+
gh release upload "$LATEST_TAG" "$LATEST_ASSET" --clobber
120129
121130
rebuild-schema:
122131
runs-on: ubuntu-latest

packages/openapi/descriptions/assistant-thread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
},
1414
content: {
1515
text: {
16-
desc: `The text contents of the Message.`,
16+
desc: `The text contents of the Message`,
1717
},
1818
array: {
1919
desc: `An array of content parts with a defined type, each can be of type text or images can be passed with image_url or image_file`,

0 commit comments

Comments
 (0)