add clippy suggestion and bump version to 1.7.0 #62
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build | |
| run: cargo build --release | |
| - name: Run tests | |
| run: cargo test --verbose | |
| - name: Create builds directory | |
| run: mkdir -p builds/licensesnip-linux | |
| - name: Check dir | |
| run: dir target/release | |
| - name: Copy build into builds directory | |
| run: cp target/release/licensesnip build | |
| - name: Zip build into tar.gz | |
| run: tar -C builds -czvf licensesnip-linux.tar.gz licensesnip-linux | |
| - name: Check dir | |
| run: dir; dir builds; dir builds/licensesnip-linux | |
| - name: Upload build | |
| uses: actions/[email protected] | |
| with: | |
| # Artifact name | |
| name: licensesnip # optional, default is artifact | |
| # A file, directory or wildcard pattern that describes what to upload | |
| path: licensesnip-linux.tar.gz | |
| # The desired behavior if no files are found using the provided path. | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build | |
| run: cargo build --release | |
| - name: Run tests | |
| run: cargo test --verbose | |
| - name: Create builds directory | |
| run: mkdir -p builds/licensesnip-win64 | |
| - name: Check dir | |
| run: ls target/release | |
| - name: Copy build into builds directory | |
| run: cp target/release/licensesnip.exe build | |
| - name: Zip build into tar.gz | |
| run: tar -C builds -czvf licensesnip-win64.tar.gz licensesnip-win64 | |
| - name: Check dir | |
| run: ls; ls builds; ls builds/licensesnip-win64 | |
| - name: Upload build | |
| uses: actions/[email protected] | |
| with: | |
| # Artifact name | |
| name: licensesnip # optional, default is artifact | |
| # A file, directory or wildcard pattern that describes what to upload | |
| path: licensesnip-win64.tar.gz | |
| # The desired behavior if no files are found using the provided path. | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build | |
| run: cargo build --release | |
| - name: Run tests | |
| run: cargo test --verbose | |
| - name: Create builds directory | |
| run: mkdir -p builds/licensesnip-macos | |
| - name: Check dir | |
| run: ls target/release | |
| - name: Copy build into builds directory | |
| run: cp target/release/licensesnip build | |
| - name: Zip build into tar.gz | |
| run: tar -C builds -czvf licensesnip-macos.tar.gz licensesnip-macos | |
| - name: Check dir | |
| run: ls; ls builds; ls builds/licensesnip-macos | |
| - name: Upload build | |
| uses: actions/[email protected] | |
| with: | |
| # Artifact name | |
| name: licensesnip # optional, default is artifact | |
| # A file, directory or wildcard pattern that describes what to upload | |
| path: licensesnip-macos.tar.gz | |
| # The desired behavior if no files are found using the provided path. |