Create a zip file for test and use the ref name instead of 'latest' f… #44
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: | |
push: | |
release: | |
types: [created] | |
# 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-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 |