From 965cabc2ed4fdce5477c8275ea14fabc0e85fbfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=82=8E=E6=B3=BC?= Date: Tue, 15 Oct 2024 09:46:22 +0800 Subject: [PATCH] CI: upgrade workflow actions - Upgrade actions/checkout from `@v2` to `@v4` - Remove unused workflow to publish to crates.io --- .github/workflows/chaos.yml | 2 +- .github/workflows/ci.yaml | 20 +++++------ .github/workflows/devskim-analysis.yml | 2 +- .github/workflows/release-memstore.yaml | 44 ----------------------- .github/workflows/release-raft.yaml | 46 ------------------------- guide/README.md | 2 +- 6 files changed, 13 insertions(+), 103 deletions(-) delete mode 100644 .github/workflows/release-memstore.yaml delete mode 100644 .github/workflows/release-raft.yaml diff --git a/.github/workflows/chaos.yml b/.github/workflows/chaos.yml index 15225a840..f0b6ca2f1 100644 --- a/.github/workflows/chaos.yml +++ b/.github/workflows/chaos.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Setup | Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup | Toolchain diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f438d7ab1..af4cfab10 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,7 +19,7 @@ jobs: steps: - name: Setup | Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup | Toolchain @@ -46,7 +46,7 @@ jobs: steps: - name: Setup | Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup | Toolchain @@ -88,7 +88,7 @@ jobs: steps: - name: Setup | Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup | Toolchain @@ -149,7 +149,7 @@ jobs: steps: - name: Setup | Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup | Toolchain @@ -187,7 +187,7 @@ jobs: steps: - name: Setup | Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup | Toolchain @@ -213,7 +213,7 @@ jobs: steps: - name: Setup | Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup | Toolchain @@ -268,7 +268,7 @@ jobs: steps: - name: Setup | Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup | Toolchain @@ -319,7 +319,7 @@ jobs: steps: - name: Setup | Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup | Toolchain @@ -353,7 +353,7 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1.0.6 with: components: rustfmt, clippy @@ -404,7 +404,7 @@ jobs: - "raft-kv-rocksdb" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1.0.6 diff --git a/.github/workflows/devskim-analysis.yml b/.github/workflows/devskim-analysis.yml index 157f01dd8..d82d4ac60 100644 --- a/.github/workflows/devskim-analysis.yml +++ b/.github/workflows/devskim-analysis.yml @@ -23,7 +23,7 @@ jobs: security-events: write steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run DevSkim scanner uses: microsoft/DevSkim-Action@v1 diff --git a/.github/workflows/release-memstore.yaml b/.github/workflows/release-memstore.yaml deleted file mode 100644 index 4d32b83df..000000000 --- a/.github/workflows/release-memstore.yaml +++ /dev/null @@ -1,44 +0,0 @@ -name: Release -on: - push: - tags: - - "disabled-v*" - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Setup | Checkout - uses: actions/checkout@v2 - - - name: Setup | Rust - uses: actions-rs/toolchain@v1.0.6 - with: - toolchain: nightly - profile: minimal - override: true - - - name: Publish memstore - run: cd memstore && cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} - - # release: - # needs: publish - # runs-on: ubuntu-latest - # steps: - # - name: Setup | Checkout - # uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - - # # save tag name in var "tag" - # - name: Extract tag - # id: vars - # run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - - # - name: Build | Publish Pre-Release - # uses: softprops/action-gh-release@v1 - # with: - # body_path: change-log/${{ steps.vars.outputs.tag }}.md - # draft: true - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-raft.yaml b/.github/workflows/release-raft.yaml deleted file mode 100644 index 39d318abb..000000000 --- a/.github/workflows/release-raft.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: Release -on: - push: - tags: - - "v*" - - "!v*-alpha*" - - "!v*-beta*" - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Setup | Checkout - uses: actions/checkout@v2 - - - name: Setup | Rust - uses: actions-rs/toolchain@v1.0.6 - with: - toolchain: nightly - profile: minimal - override: true - - - name: Publish openraft - run: cd openraft && cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} - - # release: - # needs: publish - # runs-on: ubuntu-latest - # steps: - # - name: Setup | Checkout - # uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - - # # save tag name in var "tag" - # - name: Extract tag - # id: vars - # run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - - # - name: Build | Publish - # uses: softprops/action-gh-release@v1 - # with: - # body_path: change-log/${{ steps.vars.outputs.tag }}.md - # draft: true - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/guide/README.md b/guide/README.md index 54079c346..6a12af1a5 100644 --- a/guide/README.md +++ b/guide/README.md @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-18.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install mdbook uses: drmingdrmer/mdbook-full@main