Skip to content

Commit 4b9f35d

Browse files
committed
fix: openapi
1 parent 4a1330e commit 4b9f35d

1 file changed

Lines changed: 32 additions & 3 deletions

File tree

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

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,26 @@ jobs:
7575
path: artifacts
7676

7777
- name: Show artifacts (debug)
78-
run: ls -la artifacts
78+
run: ls -la artifacts || true
79+
80+
- name: Resolve artifact paths
81+
id: find
82+
run: |
83+
set -euo pipefail
84+
PACKFILE="${{ needs.pack.outputs.packfile_name }}"
85+
PACK_PATH=$(find artifacts -type f -name "$PACKFILE" -print -quit || true)
86+
LATEST_PATH=$(find artifacts -type f -name "openapi-latest.tgz" -print -quit || true)
87+
88+
echo "Found pack path: $PACK_PATH"
89+
echo "Found latest path: $LATEST_PATH"
90+
if [ -z "$PACK_PATH" ] || [ -z "$LATEST_PATH" ]; then
91+
echo "::error::Missing artifact(s). Debug listing:"
92+
ls -Rla artifacts || true
93+
exit 1
94+
fi
95+
96+
echo "pack_path=$PACK_PATH" >> "$GITHUB_OUTPUT"
97+
echo "latest_path=$LATEST_PATH" >> "$GITHUB_OUTPUT"
7998
8099
- name: Create or update tagged release and upload versioned tarball
81100
id: gh_release_tag
@@ -84,8 +103,18 @@ jobs:
84103
tag_name: "openapi-v${{ needs.pack.outputs.version }}"
85104
name: "openapi v${{ needs.pack.outputs.version }}"
86105
body: "Automated release for packages/openapi (pack + upload)"
87-
# artifact downloads put files under ./artifacts/<filename>
88-
files: artifacts/${{ needs.pack.outputs.packfile_name }}
106+
files: ${{ steps.find.outputs.pack_path }}
107+
env:
108+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109+
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 latest"
116+
body: "Automated release for packages/openapi (latest)"
117+
files: ${{ steps.find.outputs.latest_path }}
89118
env:
90119
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91120

0 commit comments

Comments
 (0)