Skip to content

Commit

Permalink
FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanwenhe committed Dec 6, 2023
1 parent de20615 commit e9199bf
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/compressandrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,26 @@ jobs:
echo "${base}.zip" >> zipfiles.txt
done
- name: Create Release and Upload Assets
run: |
files=$(tr '\n' ' ' < zipfiles.txt)
echo "files: $files"
echo "FILES=$files" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ${{ env.FILES }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }} # This will be your-tag-name for a tag
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Assets
run: |
upload_url="${{ steps.create_release.outputs.upload_url }}"
for asset_path in $(cat zipfiles.txt); do
asset_name=$(basename $asset_path)
echo "Uploading $asset_path as $asset_name"
curl \
--data-binary @"$asset_path" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: $(file -b --mime-type $asset_path)" \
"$upload_url?name=$asset_name"
done

0 comments on commit e9199bf

Please sign in to comment.