Skip to content

Commit

Permalink
fix: Correct asset name in release pipeline (#246)
Browse files Browse the repository at this point in the history
* fix: Correct asset name in release pipeline

* fix asset name

* add comments for windows release step

* refine last comment

* add description in the getting asset_id step

* refine description
  • Loading branch information
tianfeng92 authored Feb 13, 2024
1 parent ffaec15 commit 23f7a97
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
needs: [create-release-draft]
steps:
- name: Find Matching Draft Tag
description: Fetches the `asset_id` of the uploaded bundle. A non-empty `asset_id` signals a successful upload, preventing duplicate uploads in retry attempts.
id: prep
run: |
$res = Invoke-WebRequest -Uri "https://api.github.com/repos/${{ github.repository }}/releases" -Headers @{'Authorization' = "token ${{ github.token }}"}
Expand Down Expand Up @@ -166,6 +167,7 @@ jobs:
needs: [create-release-draft]
steps:
- name: Find Matching Draft Tag
description: Fetches the `asset_id` of the uploaded bundle. A non-empty `asset_id` signals a successful upload, preventing duplicate uploads in retry attempts.
id: prep
run: |
VERSION=$(curl -s -H "Authorization: token ${{ github.token }}" \
Expand All @@ -182,7 +184,7 @@ jobs:
ASSET_ID=$(curl -s -H "Authorization: token ${{ github.token }}" \
https://api.github.com/repos/${{ github.repository }}/releases | \
jq -r "[.[] | select(.body | contains(\"- jobId: ${{ github.run_id }}\\n\"))] | first | .assets | .[] | select(.name == \"sauce-testcafe-macos.zip\") | .id | select(. != null)")
jq -r "[.[] | select(.body | contains(\"- jobId: ${{ github.run_id }}\\n\"))] | first | .assets | .[] | select(.name == \"playwright-macos-amd64.zip\") | .id | select(. != null)")
echo "version=${VERSION}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -252,7 +254,6 @@ jobs:
https://api.github.com/repos/${{ github.repository }}/releases/${{ steps.prep.outputs.release_id }} \
-d '{"draft":"false"}'
# Post Deploy Tests
post-release-windows-tests:
runs-on: ubuntu-latest
needs: publish-release
Expand Down

0 comments on commit 23f7a97

Please sign in to comment.