Update build.libgit2.sh #102
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: CI | |
on: | |
push: | |
branches: [master, release-*] | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
- '[0-9]+.[0-9]+.[0-9]+-*' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
env: | |
RID: ${{ matrix.name }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
name: android-arm | |
- os: ubuntu-20.04 | |
name: android-arm64 | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
submodules: true | |
- name: Build Windows | |
if: runner.os == 'Windows' | |
run: ./build.libgit2.ps1 ${{ matrix.param }} | |
- name: Build macOS | |
if: runner.os == 'macOS' | |
run: ./build.libgit2.sh | |
- name: Build Android | |
if: runner.os == 'Linux' && (matrix.name == 'android-arm' || matrix.name == 'android-arm64' ) | |
run: | | |
./build.libgit2.sh | |
- name: Setup QEMU | |
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset | |
if: matrix.name == 'linux-musl-arm' || matrix.name == 'linux-musl-arm64' | |
- name: Build Linux | |
if: runner.os == 'Linux' | |
run: ./dockerbuild.sh | |
- name: Upload artifacts | |
uses: actions/[email protected] | |
with: | |
name: ${{ matrix.name }} | |
path: nuget.package/runtimes/${{ matrix.name }} | |
package: | |
name: Create package | |
needs: build | |
runs-on: windows-2019 | |
env: | |
DOTNET_NOLOGO: true | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET SDK | |
uses: actions/[email protected] | |
with: | |
dotnet-version: 8.0.x | |
- name: Install MinVer | |
run: dotnet tool install --global minver-cli | |
- name: Run MinVer | |
id: minver | |
run: echo "version=$(minver)" >> $env:GITHUB_OUTPUT | |
- name: Download artifacts | |
uses: actions/[email protected] | |
with: | |
path: nuget.package/runtimes/ | |
- name: Create package | |
run: ./nuget.exe Pack nuget.package/NativeBinaries.nuspec -Version ${{ steps.minver.outputs.version }} -NoPackageAnalysis | |
- name: Upload NuGet package | |
uses: actions/[email protected] | |
with: | |
name: NuGet package | |
path: ./*.nupkg |