From 8f6531578cc9416198063829dc6f7590b3b0bf6c Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Mon, 16 Oct 2023 15:19:11 +0200 Subject: [PATCH] ci: Update action versions in workflow files (#15) * chore: Update example to tauri v1.5 * fix clippy yaaaa * ci: Update action versions in workflow files --- .github/workflows/audit.yml | 5 +- .github/workflows/covector-status.yml | 5 +- .../workflows/covector-version-or-publish.yml | 14 ++-- .github/workflows/format.yml | 21 +++--- .github/workflows/lint.yml | 15 ++-- .github/workflows/test.yml | 69 +++++-------------- 6 files changed, 50 insertions(+), 79 deletions(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 890ca1e..56db8f4 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -20,7 +20,8 @@ jobs: audit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/audit-check@v1 + - uses: actions/checkout@v4 + + - uses: rustsec/audit-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/covector-status.yml b/.github/workflows/covector-status.yml index 5ecb235..5dca819 100755 --- a/.github/workflows/covector-status.yml +++ b/.github/workflows/covector-status.yml @@ -1,14 +1,15 @@ name: covector status -on: [pull_request] +on: [ pull_request ] jobs: covector: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: covector status uses: jbolda/covector/packages/action@covector-v0 with: diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index 34b2d32..fc17236 100755 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -2,24 +2,27 @@ name: covector version or publish on: push: branches: - - dev + - dev jobs: covector: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-node@v2 + + - uses: actions/setup-node@v3 with: - node-version: 12 + node-version: 20 registry-url: 'https://registry.npmjs.org' + - name: git config run: | git config --global user.name "${{ github.event.pusher.name }}" git config --global user.email "${{ github.event.pusher.email }}" + - name: covector version-or-publish uses: jbolda/covector/packages/action@covector-v0 id: covector @@ -27,9 +30,10 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} command: 'version-or-publish' createRelease: true + - name: create pull request id: cpr - uses: tauri-apps/create-pull-request@v2.8.0 + uses: tauri-apps/create-pull-request@v3 with: title: "Publish New Versions" labels: "version updates" diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 1706fdf..646e625 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -16,15 +16,14 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v2 - - name: Install rustfmt with nightly toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true + - uses: actions/checkout@v4 + + - name: Install rustfmt with nightly toolchain + uses: dtolnay/rust-toolchain@nightly + with: components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --manifest-path=Cargo.toml --all -- --check + + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --manifest-path=Cargo.toml --all -- --check diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 25780fb..5ea52e3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,18 +16,21 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + - name: install webkit2gtk run: | sudo apt-get update sudo apt-get install -y webkit2gtk-4.0 + + - name: Set up cargo cache + uses: Swatinem/rust-cache@v2 + - name: Install clippy with stable toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true - components: clippy + components: clippy + - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 65625fc..15480b5 100755 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,62 +19,25 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ ubuntu-latest, macos-latest, windows-latest ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - - name: Install gtk on Ubuntu - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y webkit2gtk-4.0 - - name: Get current date - if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' - run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + - name: Install stable toolchain + uses: dtolnay/rust-toolchain@stable - - name: Get current date - if: matrix.os == 'windows-latest' - run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + - name: Install gtk on Ubuntu + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y webkit2gtk-4.0 - - name: Cache cargo registry - uses: actions/cache@v2 - with: - path: ~/.cargo/registry - # Add date to the cache to keep it up to date - key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }} - # Restore from outdated cache for speed - restore-keys: | - ${{ matrix.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }} + - name: Set up cargo cache + uses: Swatinem/rust-cache@v2 - - name: Cache cargo index - uses: actions/cache@v2 - with: - path: ~/.cargo/git - # Add date to the cache to keep it up to date - key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }} - # Restore from outdated cache for speed - restore-keys: | - ${{ matrix.os }}-${{ matrix.rust }}-cargo-index-${{ hashFiles('**/Cargo.toml') }} - - - name: Cache cargo target - uses: actions/cache@v2 - with: - path: ${{ matrix.project}}/target - # Add date to the cache to keep it up to date - key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }} - # Restore from outdated cache for speed - restore-keys: | - ${{ matrix.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }} - - - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test - args: --manifest-path=Cargo.toml --release + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --manifest-path=Cargo.toml --release