Skip to content

remove usage of set-output #21

remove usage of set-output

remove usage of set-output #21

#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")
- name: Get Latest Release Id and Upload URL
id: get-release-upload-url
run: |
response=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/releases/latest")
upload_url=$(echo "$response" | jq -r '.upload_url' | sed 's/{?name,label}//g')
release_id=$(echo "$response" | jq -r '.id')
echo "name=release_id::$release_id" >> $GITHUB_ENV
echo "name=upload_url::$upload_url" >> $GITHUB_ENV
echo "Latest Release ID: ${{ env.release_id }}"
echo "Latest Release Upload URL: ${{ env.upload_url }}"
- name: Marketplace Release Artifacts
id: marketplace-release-Artifact
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/zip" \
${{ env.upload_url }}?name=AdyenPaymentShopware6.zip \
-F "[email protected]"