From 89642c957fc34eede1227a9c2b797b25156b12f2 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Sun, 13 Oct 2024 11:08:57 +0800 Subject: [PATCH] Fix CI, upgrade actions/* version. (#220) - `actions/download-artifact@v4` - `actions/upload-artifact@v4` - `actions/checkout@v4` --- .github/workflows/ci.yml | 10 +++++----- .github/workflows/release-crate-gem.yml | 20 ++++++++++---------- .github/workflows/release-java.yml | 8 ++++---- .github/workflows/release-node.yml | 2 +- .github/workflows/release-py.yml | 14 +++++++------- .github/workflows/release-wasm.yml | 2 +- .github/workflows/release.yml | 4 ++-- README.md | 2 +- autocorrect-website/src/docs/usage.md | 2 +- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99e71b21..5758d0ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup | Cache Cargo uses: actions/cache@v3.0.11 with: @@ -42,7 +42,7 @@ jobs: name: Test for Node.js runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" @@ -71,7 +71,7 @@ jobs: name: Test for Python runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup | Cache Cargo uses: actions/cache@v3.0.11 with: @@ -96,7 +96,7 @@ jobs: name: Test for Ruby runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup | Cache Cargo uses: actions/cache@v3.0.11 with: @@ -125,7 +125,7 @@ jobs: runs-on: ${{ matrix.settings.host }} name: Test for Java on ${{ matrix.settings.host }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup | Cache Cargo uses: actions/cache@v3.0.11 with: diff --git a/.github/workflows/release-crate-gem.yml b/.github/workflows/release-crate-gem.yml index 79746fc4..e14b0374 100644 --- a/.github/workflows/release-crate-gem.yml +++ b/.github/workflows/release-crate-gem.yml @@ -1,8 +1,8 @@ -name: 'Release Crate & RubyGem' +name: "Release Crate & RubyGem" on: push: tags: - - 'v*' + - "v*" branches: - release-gem jobs: @@ -10,7 +10,7 @@ jobs: name: Publish Crate runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions-rs/cargo@v1 if: startsWith(github.ref, 'refs/tags/v') name: Release Crate @@ -33,10 +33,10 @@ jobs: - aarch64-linux - x86_64-linux-musl steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: oxidize-rb/actions/setup-ruby-and-rust@v1.1.9 with: - ruby-version: '3.3' + ruby-version: "3.3" bundler-cache: true cargo-cache: true cargo-vendor: false @@ -49,7 +49,7 @@ jobs: with: platform: ${{ matrix.ruby-platform }} working-directory: autocorrect-rb/ - ruby-versions: '3.3, 3.2, 3.1' # optional + ruby-versions: "3.3, 3.2, 3.1" # optional - name: Upload Gem uses: actions/upload-artifact@v3 @@ -63,10 +63,10 @@ jobs: - publish_crate runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: oxidize-rb/actions/setup-ruby-and-rust@v1.1.9 with: - ruby-version: '3.3' + ruby-version: "3.3" bundler-cache: false cargo-cache: true cargo-vendor: true @@ -93,7 +93,7 @@ jobs: steps: - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.3' + ruby-version: "3.3" bundler-cache: true - uses: actions/download-artifact@v3 with: @@ -106,7 +106,7 @@ jobs: - name: Publish to RubyGem env: - RUBYGEM_TOKEN: '${{secrets.RUBYGEM_TOKEN}}' + RUBYGEM_TOKEN: "${{secrets.RUBYGEM_TOKEN}}" working-directory: pkg/ run: | mkdir -p $HOME/.gem diff --git a/.github/workflows/release-java.yml b/.github/workflows/release-java.yml index c8edb46c..0e5200a3 100644 --- a/.github/workflows/release-java.yml +++ b/.github/workflows/release-java.yml @@ -28,7 +28,7 @@ jobs: target: aarch64-apple-darwin runs-on: ${{ matrix.settings.host }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true @@ -45,7 +45,7 @@ jobs: cargo build -p autocorrect-java --release --target ${{ matrix.settings.target }} mv target/${{ matrix.settings.target }}/release/${{ matrix.settings.lib_prefix }}autocorrect_java${{ matrix.settings.lib_suffix }} autocorrect_java-${{ matrix.settings.target }}${{ matrix.settings.lib_suffix }} - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: jnis path: autocorrect_java-${{ matrix.settings.target }}${{ matrix.settings.lib_suffix }} @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true @@ -65,7 +65,7 @@ jobs: distribution: "temurin" - name: Download all artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: jnis path: ./autocorrect-java/jnis diff --git a/.github/workflows/release-node.yml b/.github/workflows/release-node.yml index fcdd980a..d8afe911 100644 --- a/.github/workflows/release-node.yml +++ b/.github/workflows/release-node.yml @@ -238,7 +238,7 @@ jobs: - test-linux-x64-gnu-binding - test-linux-x64-musl-binding steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup node uses: actions/setup-node@v3 with: diff --git a/.github/workflows/release-py.yml b/.github/workflows/release-py.yml index fb3a941d..9d027508 100644 --- a/.github/workflows/release-py.yml +++ b/.github/workflows/release-py.yml @@ -29,7 +29,7 @@ jobs: target: aarch64 args: --release --out dist -m autocorrect-py/Cargo.toml - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -57,7 +57,7 @@ jobs: target: ${{ matrix.target }} args: --release --out dist -m autocorrect-py/Cargo.toml - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -80,7 +80,7 @@ jobs: manylinux: auto args: --release --out dist -m autocorrect-py/Cargo.toml - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -102,7 +102,7 @@ jobs: manylinux: auto args: --release --out dist -m autocorrect-py/Cargo.toml - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -127,7 +127,7 @@ jobs: manylinux: musllinux_1_2 args: --release --out dist -m autocorrect-py/Cargo.toml - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -153,7 +153,7 @@ jobs: manylinux: musllinux_1_2 args: --release --out dist -m autocorrect-py/Cargo.toml - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -163,7 +163,7 @@ jobs: runs-on: ubuntu-latest needs: [macos, windows, linux, linux-cross, musllinux, musllinux-cross] steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: wheels - uses: actions/setup-python@v4 diff --git a/.github/workflows/release-wasm.yml b/.github/workflows/release-wasm.yml index bd6edcb9..832b9b25 100644 --- a/.github/workflows/release-wasm.yml +++ b/.github/workflows/release-wasm.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup | Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de56a021..e9b7dbeb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -127,7 +127,7 @@ jobs: cd - - name: Deploy | Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.name }} path: ${{ matrix.name }} @@ -144,7 +144,7 @@ jobs: fetch-depth: 0 - name: Setup | Artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: path: release-dist diff --git a/README.md b/README.md index 7597e207..119544d7 100644 --- a/README.md +++ b/README.md @@ -380,7 +380,7 @@ Add to your `.github/workflows/ci.yml` ```yml steps: - name: Check source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: AutoCorrect uses: huacnlee/autocorrect-action@main diff --git a/autocorrect-website/src/docs/usage.md b/autocorrect-website/src/docs/usage.md index bfd77622..b9db119b 100644 --- a/autocorrect-website/src/docs/usage.md +++ b/autocorrect-website/src/docs/usage.md @@ -311,7 +311,7 @@ Add to your `.github/workflows/ci.yml` ```yml steps: - name: Check source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: AutoCorrect uses: huacnlee/autocorrect-action@main