mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-26 09:20:50 +00:00
ci: GitHub Actions 上传ZIP包
This commit is contained in:
parent
5dcc2b0b46
commit
c0634a335e
49
.github/workflows/release.yml
vendored
49
.github/workflows/release.yml
vendored
@ -36,19 +36,36 @@ jobs:
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload all *.zip artifacts from submodules
|
||||
run: |
|
||||
for module in novel-common novel-crawl novel-front novel-admin
|
||||
do
|
||||
for file in $(find ./$module/target/build -type f -name "*.zip")
|
||||
do
|
||||
asset_path="$file"
|
||||
asset_name=$(basename "$file")
|
||||
echo "Uploading $asset_name..."
|
||||
curl -X POST \
|
||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-H "Content-Type: application/zip" \
|
||||
--data-binary @"$file" \
|
||||
"${{ steps.create_release.outputs.upload_url }}?name=$asset_name"
|
||||
done
|
||||
done
|
||||
|
||||
# 使用 action 来替代直接 curl 进行上传
|
||||
- name: Upload sql.zip
|
||||
uses: actions/upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/novel-common/target/build/sql.zip
|
||||
asset_name: sql.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload novel-crawl.zip
|
||||
uses: actions/upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/novel-crawl/target/build/novel-crawl.zip
|
||||
asset_name: novel-crawl.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload novel-front.zip
|
||||
uses: actions/upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/novel-front/target/build/novel-front.zip
|
||||
asset_name: novel-front.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload novel-admin.zip
|
||||
uses: actions/upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/novel-admin/target/build/novel-admin.zip
|
||||
asset_name: novel-admin.zip
|
||||
asset_content_type: application/zip
|
Loading…
x
Reference in New Issue
Block a user