GitHub Actions: clippy interaction fix for Win/Mac (#671)

This commit is contained in:
iceiix 2022-03-06 18:25:27 -08:00 committed by GitHub
parent 2fd10442bb
commit 45f9cd45b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 6 deletions

View File

@ -66,11 +66,22 @@ jobs:
- name: Build binary
run: |
cargo build --verbose --release
- name: Run clippy
uses: actions-rs/clippy-check@v1.0.7
- name: Check workflow permissions
id: check_permissions
uses: scherermichael-oss/action-has-permission@1.0.6
with:
required-permission: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run clippy action to produce annotations
uses: actions-rs/clippy-check@v1.0.7
if: steps.check_permissions.outputs.has-permission
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets -- -D warnings
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run clippy manually without annotations
if: ${{ !steps.check_permissions.outputs.has-permission }}
run: cargo clippy --all-targets -- -D warnings
- name: Check formatting
run: cargo fmt --all -- --check
- name: Upload binary
@ -103,11 +114,22 @@ jobs:
chmod a+x target/release/stevenarella
env:
MACOSX_DEPLOYMENT_TARGET: 10.14
- name: Run clippy
uses: actions-rs/clippy-check@v1.0.7
- name: Check workflow permissions
id: check_permissions
uses: scherermichael-oss/action-has-permission@1.0.6
with:
required-permission: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run clippy action to produce annotations
uses: actions-rs/clippy-check@v1.0.7
if: steps.check_permissions.outputs.has-permission
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets -- -D warnings
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run clippy manually without annotations
if: ${{ !steps.check_permissions.outputs.has-permission }}
run: cargo clippy --all-targets -- -D warnings
- name: Check formatting
run: cargo fmt --all -- --check
- name: Package binary