From 2a3b84732a44dfafce2619a0b9bf9dad768c92b3 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 30 Jun 2026 06:04:59 +0800 Subject: ci: restrict CI trigger to main branch and add unreleased tag job --- .github/workflows/ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to '.github/workflows/ci.yml') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68db23e..441ea47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,11 @@ name: CI -on: [push] +on: + push: + branches: [main] + +permissions: + contents: write jobs: ci: @@ -12,3 +17,15 @@ jobs: - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: cargo ci + + move-unreleased-tag: + if: github.ref == 'refs/heads/main' + needs: ci + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - run: | + git tag -f unreleased + git push origin unreleased --force -- cgit