Skip to content

Commit 1d22425

Browse files
authored
fix: pr preview build action name (#106)
1 parent b62ca12 commit 1d22425

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/pr-preview-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PR Preview Release Binaries
1+
name: PR Preview Build
22

33
on:
44
pull_request:
@@ -52,7 +52,7 @@ jobs:
5252
- name: Upload Build Artifact
5353
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5454
with:
55-
name: agentapi-preview-build
55+
name: agentapi-build-${{ github.event.pull_request.number }}
5656
path: ${{ github.workspace }}/out
5757
retention-days: 7
5858

.github/workflows/pr-preview-release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,20 @@ jobs:
4040
- name: Create or Update PR Release
4141
env:
4242
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
RELEASE_TAG: 'agentapi_${{ github.event.pull_request.number }}'
43+
RELEASE_TAG: 'agentapi_${{ steps.pr.outputs.number }}'
44+
PR_NUMBER: ${{ steps.pr.outputs.number }}
4445

4546
run: |
4647
# Check if release exists
47-
if gh release view "$RELEASE_TAG" &>/dev/null; then
48+
if gh release view "$RELEASE_TAG" --repo ${{ github.repository }} &>/dev/null; then
4849
echo "Updating release $RELEASE_TAG"
49-
gh release upload "$RELEASE_TAG" "$GITHUB_WORKSPACE"/out/* --clobber
50+
gh release upload "$RELEASE_TAG" ./out/* --clobber --repo ${{ github.repository }}
5051
else
5152
echo "Creating release $RELEASE_TAG"
52-
gh release create "$RELEASE_TAG" "$GITHUB_WORKSPACE"/out/* \
53+
gh release create "$RELEASE_TAG" ./out/* \
5354
--title "$RELEASE_TAG" \
5455
--notes "Preview release for PR #${PR_NUMBER}" \
55-
--draft --latest=false
56+
--repo ${{ github.repository }}
5657
fi
5758
5859
- name: Comment on PR

0 commit comments

Comments
 (0)