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:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
gh release create "${{ steps.version.outputs.tag }}" \
|
tag="${GITHUB_REF#refs/tags/}"
|
||||||
--title="${{ steps.version.outputs.tag }}" \
|
|
||||||
--notes "Release ${{ steps.version.outputs.tag }}" \
|
files=()
|
||||||
${{ env.PLUGIN_NAME }}-${{ steps.version.outputs.version }}.zip \
|
for file in main.js manifest.json; do
|
||||||
main.js \
|
if [ -f "$file" ]; then
|
||||||
manifest.json \
|
files+=("$file")
|
||||||
$([ -f "styles.css" ] && echo "styles.css") \
|
else
|
||||||
source-code.zip \
|
echo "Warning: $file not found"
|
||||||
source-code.tar.gz
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
gh release create "$tag" \
|
||||||
|
--title="$tag" \
|
||||||
|
--draft \
|
||||||
|
"${files[@]}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user