mirror of
https://github.com/woodchen-ink/obsidian-lskypro-uploader.git
synced 2025-07-19 06:12:07 +08:00
优化 GitHub 发布工作流,增加文件存在性检查并支持将发布标记为草稿。
This commit is contained in:
parent
e7ba7643ce
commit
d955668598
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@ -73,12 +73,19 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release create "${{ steps.version.outputs.tag }}" \
|
||||
--title="${{ steps.version.outputs.tag }}" \
|
||||
--notes "Release ${{ steps.version.outputs.tag }}" \
|
||||
${{ env.PLUGIN_NAME }}-${{ steps.version.outputs.version }}.zip \
|
||||
main.js \
|
||||
manifest.json \
|
||||
$([ -f "styles.css" ] && echo "styles.css") \
|
||||
source-code.zip \
|
||||
source-code.tar.gz
|
||||
tag="${GITHUB_REF#refs/tags/}"
|
||||
|
||||
files=()
|
||||
for file in main.js manifest.json; do
|
||||
if [ -f "$file" ]; then
|
||||
files+=("$file")
|
||||
else
|
||||
echo "Warning: $file not found"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
gh release create "$tag" \
|
||||
--title="$tag" \
|
||||
--draft \
|
||||
"${files[@]}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user