Add context lines, gzip support, config files, and multi-file prefixes #2
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| artifact: loggrep-linux-amd64 | |
| - os: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| artifact: loggrep-linux-arm64 | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| artifact: loggrep-macos-amd64 | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| artifact: loggrep-macos-arm64 | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| artifact: loggrep-windows-amd64.exe | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross-compilation tools | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu | |
| echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV | |
| - run: cargo build --release --target ${{ matrix.target }} | |
| - name: Rename binary | |
| shell: bash | |
| run: | | |
| if [[ "${{ matrix.os }}" == "windows-latest" ]]; then | |
| cp target/${{ matrix.target }}/release/loggrep.exe ${{ matrix.artifact }} | |
| else | |
| cp target/${{ matrix.target }}/release/loggrep ${{ matrix.artifact }} | |
| fi | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.artifact }} | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| merge-multiple: true | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| loggrep-linux-amd64 | |
| loggrep-linux-arm64 | |
| loggrep-macos-amd64 | |
| loggrep-macos-arm64 | |
| loggrep-windows-amd64.exe |