Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/pr-preview-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PR Preview Release Binaries
name: PR Preview Build

on:
pull_request:
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Upload Build Artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: agentapi-preview-build
name: agentapi-build-${{ github.event.pull_request.number }}
path: ${{ github.workspace }}/out
retention-days: 7

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/pr-preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,20 @@ jobs:
- name: Create or Update PR Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: 'agentapi_${{ github.event.pull_request.number }}'
RELEASE_TAG: 'agentapi_${{ steps.pr.outputs.number }}'
PR_NUMBER: ${{ steps.pr.outputs.number }}

run: |
# Check if release exists
if gh release view "$RELEASE_TAG" &>/dev/null; then
if gh release view "$RELEASE_TAG" --repo ${{ github.repository }} &>/dev/null; then
echo "Updating release $RELEASE_TAG"
gh release upload "$RELEASE_TAG" "$GITHUB_WORKSPACE"/out/* --clobber
gh release upload "$RELEASE_TAG" ./out/* --clobber --repo ${{ github.repository }}
else
echo "Creating release $RELEASE_TAG"
gh release create "$RELEASE_TAG" "$GITHUB_WORKSPACE"/out/* \
gh release create "$RELEASE_TAG" ./out/* \
--title "$RELEASE_TAG" \
--notes "Preview release for PR #${PR_NUMBER}" \
--draft --latest=false
--repo ${{ github.repository }}
fi

- name: Comment on PR
Expand Down