syntax fix #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#on: | ||
# release: | ||
# types: [created, edited] | ||
on: ["push", "workflow_dispatch"] | ||
name: Upload Release Asset | ||
jobs: | ||
run: | ||
name: Upload Release Asset | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Prepare release artifact | ||
run: .github/workflows/scripts/prepare-release.sh | ||
# - name: Get Latest Release ID | ||
# id: get-release-id | ||
# run: | | ||
# response=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/releases/latest") | ||
# release_id=$(echo "$response" | jq -r '.id') | ||
# echo "release_id=$release_id" >> $GITHUB_OUTPUT | ||
- name: Get 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/latest") | ||
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 "upload_url=$upload_url" >> $GITHUB_OUTPUT | ||
echo "release_id=$release_id" >> $GITHUB_OUTPUT | ||
echo "tag_name=$tag_name" >> $GITHUB_OUTPUT | ||
- name: Display Latest Release Info | ||
run: | | ||
echo "Latest Release ID: ${{ steps.get-release-info.outputs.release_id }}" | ||
echo "Latest Release Upload URL: ${{ steps.get-release-info.outputs.upload_url }}" | ||
echo "Latest Release Tag name: ${{ steps.get-release-info.outputs.tag_name }}" | ||
- name: Marketplace Release Artifacts | ||
id: marketplace-release-Artifact | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
ls -l | ||
gh api \ | ||
--method POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
# -H "Content-Type: application/zip" \ | ||
${{ steps.get-release-upload-url.outputs.upload_url }}?name=AdyenPaymentShopware6.zip \ | ||
# -f "[email protected]" | ||
-f "[email protected]" | ||
# | ||
# - name: Upload asset | ||
# run: | | ||
# gh release upload ${{ steps.get-release-info.outputs.tag_name }} AdyenPaymentShopware6.zip |