mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-26 17:20:52 +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
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
- name: Upload all *.zip artifacts from submodules
|
|
||||||
run: |
|
# 使用 action 来替代直接 curl 进行上传
|
||||||
for module in novel-common novel-crawl novel-front novel-admin
|
- name: Upload sql.zip
|
||||||
do
|
uses: actions/upload-release-asset@v1
|
||||||
for file in $(find ./$module/target/build -type f -name "*.zip")
|
with:
|
||||||
do
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path="$file"
|
asset_path: ${{ github.workspace }}/novel-common/target/build/sql.zip
|
||||||
asset_name=$(basename "$file")
|
asset_name: sql.zip
|
||||||
echo "Uploading $asset_name..."
|
asset_content_type: application/zip
|
||||||
curl -X POST \
|
|
||||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
- name: Upload novel-crawl.zip
|
||||||
-H "Content-Type: application/zip" \
|
uses: actions/upload-release-asset@v1
|
||||||
--data-binary @"$file" \
|
with:
|
||||||
"${{ steps.create_release.outputs.upload_url }}?name=$asset_name"
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
done
|
asset_path: ${{ github.workspace }}/novel-crawl/target/build/novel-crawl.zip
|
||||||
done
|
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