Skip to content

Commit

Permalink
Update nightly-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DoroWolf authored Dec 21, 2024
1 parent 27241bb commit a8ded32
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Nightly Build and Release (3:00, UTC+8)"
name: "Nightly Build and Release (3:00, UTC+8)"

on:
schedule:
Expand All @@ -18,16 +18,18 @@ jobs:
with:
fetch-depth: 0

- name: Delete nightly tag
- name: Delete nightly tag if exists
run: |
if git rev-parse refs/tags/nightly >/dev/null 2>&1; then
echo "Deleting existing nightly tag..."
git push origin :refs/tags/nightly
else
echo "Tag `nightly` is not found"
echo "No existing nightly tag found"
fi
- name: Create new nightly tag
run: |
echo "Creating new nightly tag..."
git tag nightly
git push origin nightly
Expand All @@ -37,14 +39,17 @@ jobs:
run: |
release_exists=$(gh release list --json tagName --jq '.[] | select(.tagName=="nightly") | .tagName')
if [ -z "$release_exists" ]; then
echo "Creating new release for nightly tag..."
gh release create nightly \
--prerelease \
--title "Nightly Release" \
--notes "> 这是 Nightly 版本,本项目已不再提供正式版本。\r\n> 请点击 Assets -> Source code 下载源代码。"
--notes "> 这是 Nightly 版本,由于无法及时同步代码和验证版本的稳定性,本项目已不再提供正式版本。请点击 Assets -> Source code 下载当前最新源代码。"
else
echo "Deleting existing release for nightly tag..."
gh release delete nightly -y
echo "Creating new release for nightly tag..."
gh release create nightly \
--prerelease \
--title "Nightly Release" \
--notes "> 这是 Nightly 版本,本项目已不再提供正式版本。\r\n> 请点击 Assets -> Source code 下载源代码。"
--notes "> 这是 Nightly 版本,由于无法及时同步代码和验证版本的稳定性,本项目已不再提供正式版本。请点击 Assets -> Source code 下载当前最新源代码。"
fi

0 comments on commit a8ded32

Please sign in to comment.