Skip to content

Commit

Permalink
Create nightly-build.yml
Browse files Browse the repository at this point in the history
Delete .github/workflows/weekly-release.yml
  • Loading branch information
DoroWolf committed Dec 21, 2024
1 parent aba8a81 commit 1b8afc7
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 26 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker-build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Docker Build and Publish
name: "Docker Build and Publish (3:00, UTC+8)"

on:
push:
branches: [master]

schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Nightly Build and Release (3:00, UTC+8)"

on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:

permissions:
contents: write

jobs:
nightly:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Delete and recreate nightly tag
run: |
if git rev-parse refs/tags/nightly >/dev/null 2>&1; then
git tag -d nightly
git push origin --delete nightly
fi
git tag nightly
git push origin nightly
- name: Update release version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
release_exists=$(gh release list --json tagName --jq '.[] | select(.tagName=="nightly") | .tagName')
if [ -n "$release_exists" ]; then
gh release delete nightly -y
fi
gh release create nightly \
--title "Nightly Release" \
--notes "> 这是 Nightly 版本,由于无法及时同步代码和验证版本的稳定性,本项目已不再提供正式版本。请点击 Assets -> Source code 下载当前最新源代码。"
22 changes: 0 additions & 22 deletions .github/workflows/weekly-release.yml

This file was deleted.

0 comments on commit 1b8afc7

Please sign in to comment.