Skip to content

Commit

Permalink
[ECP-8954] Use tag name directly
Browse files Browse the repository at this point in the history
  • Loading branch information
candemiralp authored May 22, 2024
1 parent 15ba25f commit ba3e34b
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/upload-release-asset.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
on:
release:
types: [published, created]
types: [published]

name: Upload Release Asset
name: Upload Shopware 6 Marketplace asset

jobs:
run:
Expand All @@ -15,22 +15,8 @@ jobs:
- name: Prepare release artifact
run: .github/workflows/scripts/prepare-release-asset.sh

- name: Gather Latest Release Information
id: get-release-info
run: |
response=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/releases/${{ github.ref_name }}")
release_id=$(echo "$response" | jq -r '.id')
upload_url=$(echo "$response" | jq -r '.upload_url' | sed 's/{?name,label}//g')
tag_name=$(echo "$response" | jq -r '.tag_name')
echo "tag_name=$tag_name" >> $GITHUB_OUTPUT
echo "Latest Release ID: $release_id"
echo "Latest Release Upload URL: $upload_url"
echo "Latest Release Tag name: $tag_name"
- name: Upload asset
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ steps.get-release-info.outputs.tag_name }} AdyenPaymentShopware6.zip --clobber
gh release upload ${{ github.ref_name }} AdyenPaymentShopware6.zip --clobber

0 comments on commit ba3e34b

Please sign in to comment.