diff --git a/.github/actions/prepare-environment/action.yml b/.github/actions/prepare-environment/action.yml deleted file mode 100644 index a4a44eb..0000000 --- a/.github/actions/prepare-environment/action.yml +++ /dev/null @@ -1,24 +0,0 @@ -on: - workflow_call: - inputs: - branch-ref: - required: true - type: string - -jobs: - prepare-environment: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - name: Checkout repository - - name: Setup rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - - uses: Swatinem/rust-cache@v2 - name: Cache dependencies - with: - cache-all-crates: true - save-if: ${{ inputs.branch-ref == 'refs/heads/master' }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac12cf4..e19b41c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,10 +15,11 @@ jobs: steps: - uses: actions/checkout@v3 name: Checkout repository - - name: Setup Environment - uses: ./.github/actions/prepare-environment + - uses: Swatinem/rust-cache@v2 + name: Cache dependencies with: - branch-ref: ${{ github.ref }} + cache-all-crates: true + save-if: ${{ github.ref == 'refs/heads/master' }} - name: Run tests run: cargo test --verbose @@ -30,10 +31,11 @@ jobs: steps: - uses: actions/checkout@v3 name: Checkout repository - - name: Setup Environment - uses: ./.github/actions/prepare-environment + - uses: Swatinem/rust-cache@v2 + name: Cache dependencies with: - branch-ref: ${{ github.ref }} + cache-all-crates: true + save-if: ${{ github.ref == 'refs/heads/master' }} - name: Publish to crates.io uses: katyo/publish-crates@v2 with: