diff --git a/.github/workflows/docker-build-and-publish.yml b/.github/workflows/docker-build-and-publish.yml index 688ef7f642..1f35156357 100644 --- a/.github/workflows/docker-build-and-publish.yml +++ b/.github/workflows/docker-build-and-publish.yml @@ -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 diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml new file mode 100644 index 0000000000..c9ddb91a5d --- /dev/null +++ b/.github/workflows/nightly-build.yml @@ -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 下载当前最新源代码。" diff --git a/.github/workflows/weekly-release.yml b/.github/workflows/weekly-release.yml deleted file mode 100644 index 25fa8e6fda..0000000000 --- a/.github/workflows/weekly-release.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: "Weekly Release" - -on: - schedule: - - cron: "0 0 * * 1" - workflow_dispatch: - -jobs: - weekly-release: - name: Weekly Release - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: master - - - uses: rui-costa/action-automatic-semver-releases@v1 - with: - TOKEN: ${{ secrets.GITHUB_TOKEN }} - SEMVER: PATCH