diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-30 06:04:59 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-30 06:04:59 +0800 |
| commit | 2a3b84732a44dfafce2619a0b9bf9dad768c92b3 (patch) | |
| tree | 1a7f78e3041ef3847de2fd367642bded2a232c6d | |
| parent | 3888feded3cb83865d6161de642a1a298a7a5835 (diff) | |
ci: restrict CI trigger to main branch and add unreleased tag job
| -rw-r--r-- | .github/workflows/ci.yml | 19 |
1 files changed, 18 insertions, 1 deletions
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 |
