Bump libgit2-sys from 0.13.4+1.4.2 to 0.13.5+1.4.5 #64
Workflow file for this run
This file contains 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: pipeline | |
on: [push, pull_request] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: build | |
run: cargo test --no-run | |
- name: test | |
run: cargo test -- --nocapture --quiet | |
- name: formatting | |
run: cargo fmt --all -- --check | |
- name: check | |
run: cargo check | |
- name: clippy | |
run: cargo clippy -- -D warnings | |
publish_binary: | |
if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, 'bin') | |
name: Publish git-anger-management | |
needs: check | |
runs-on: ubuntu-latest | |
env: | |
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo login $CRATES_IO_TOKEN | |
- run: cargo publish --manifest-path bin/Cargo.toml | |
publish_library: | |
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'lib') | |
name: Publish git-anger-library | |
needs: check | |
runs-on: ubuntu-latest | |
env: | |
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo login $CRATES_IO_TOKEN | |
- run: cargo publish --manifest-path lib/Cargo.toml | |
github_build: | |
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'bin') | |
needs: check | |
name: Build release binaries | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
- x86_64-unknown-linux-musl | |
- x86_64-apple-darwin | |
- x86_64-pc-windows-msvc | |
include: | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
name: git-anger-management-x86_64-unknown-linux-gnu.tar.gz | |
- target: x86_64-unknown-linux-musl | |
os: ubuntu-latest | |
name: git-anger-management-x86_64-unknown-linux-musl.tar.gz | |
- target: x86_64-apple-darwin | |
os: macOS-latest | |
name: git-anger-management-x86_64-apple-darwin.tar.gz | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
name: git-anger-management-x86_64-pc-windows-msvc.zip | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
target: ${{ matrix.target }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install musl tools | |
if: matrix.target == 'x86_64-unknown-linux-musl' | |
run: sudo apt-get install -y musl-tools libssl-dev | |
- name: Build target | |
if: matrix.target != 'x86_64-unknown-linux-musl' | |
run: cargo build --release --target ${{ matrix.target }} | |
- name: Build target (musl) | |
if: matrix.target == 'x86_64-unknown-linux-musl' | |
run: cargo build --release --target ${{ matrix.target }} | |
- name: Prepare build artifacts [Windows] | |
if: matrix.os == 'windows-latest' | |
run: | | |
cd target/${{ matrix.target }}/release | |
strip git-anger-management.exe | |
cp ../assets/* . | |
7z a ../../../${{ matrix.name }} git-anger-management.exe _git-anger-management git-anger-management.1 git-anger-management.bash git-anger-management.elv git-anger-management.fish _git-anger-management.ps1 | |
cd - | |
- name: Prepare build artifacts [-nix] | |
if: matrix.os != 'windows-latest' | |
run: | | |
cd target/${{ matrix.target }}/release | |
strip git-anger-management | |
cp ../assets/* . | |
tar czvf ../../../${{ matrix.name }} git-anger-management _git-anger-management git-anger-management.1 git-anger-management.bash git-anger-management.elv git-anger-management.fish _git-anger-management.ps1 | |
cd - | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} | |
path: ${{ matrix.name }} | |
github_release: | |
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'bin') | |
name: Create GitHub Release | |
needs: github_build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Linux GNU artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: git-anger-management-x86_64-unknown-linux-gnu.tar.gz | |
path: . | |
- name: Download Linux MUSL artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: git-anger-management-x86_64-unknown-linux-musl.tar.gz | |
path: . | |
- name: Download Darwin artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: git-anger-management-x86_64-apple-darwin.tar.gz | |
path: . | |
- name: Download Windows artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: git-anger-management-x86_64-pc-windows-msvc.zip | |
path: . | |
- name: Print directory | |
run: ls -R | |
- name: Create GitHub release ${{ matrix.target }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
git-anger-management-x86_64-apple-darwin.tar.gz | |
git-anger-management-x86_64-pc-windows-msvc.zip | |
git-anger-management-x86_64-unknown-linux-gnu.tar.gz | |
git-anger-management-x86_64-unknown-linux-musl.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |