GitHub Actions: clippy interaction fix for Win/Mac (#671)
This commit is contained in:
parent
2fd10442bb
commit
45f9cd45b0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue