Skip to content

Commit

Permalink
git-artifacts: also build the nuget package
Browse files Browse the repository at this point in the history
The two NuGet artifact exists only in the 64-bit version. So let's make
them in a separate, non-matrix job.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Sep 16, 2022
1 parent 286f370 commit a62b7f9
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/git-artifacts.yml
Expand Up @@ -327,3 +327,52 @@ jobs:
with:
name: ${{matrix.artifact.name}}-${{matrix.arch.name}}
path: artifacts
nuget:
runs-on: windows-latest
needs: pkg
steps:
- name: Download pkg-x86_64
uses: actions/download-artifact@v1
with:
name: pkg-x86_64
path: pkg-x86_64
- name: Download bundle-artifacts
uses: actions/download-artifact@v1
with:
name: bundle-artifacts
path: bundle-artifacts
- name: Download git-sdk-64-build-installers
shell: bash
run: |
# Use Git Bash to download and unpack the artifact
## Get artifact
urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
id=${{ needs.pkg.outputs.latest-sdk64-extra-build-id }}
download_url=$(curl "$urlbase/$id/artifacts" |
jq -r '.value[] | select(.name == "git-sdk-64-build-installers").resource.downloadUrl')
curl -o artifacts.zip "$download_url"
## Unpack artifact
unzip artifacts.zip
- name: Clone and update build-extra
shell: bash
run: |
d=git-sdk-64-build-installers/usr/src/build-extra &&
git clone --single-branch -b main https://github.com/git-for-windows/build-extra $d &&
git -C $d pull "$PWD"/bundle-artifacts/build-extra.bundle main
- uses: nuget/setup-nuget@v1
- name: Build 64-bit NuGet packages
shell: powershell
run: |
& .\git-sdk-64-build-installers\usr\bin\bash.exe -lc @"
/usr/src/build-extra/please.sh make_installers_from_mingw_w64_git --version=`$(cat pkg-x86_64/ver) -o artifacts --nuget --pkg=pkg-x86_64/mingw-w64-x86_64-git-[0-9]*.tar.xz --pkg=pkg-x86_64/mingw-w64-x86_64-git-doc-html-[0-9]*.tar.xz &&
/usr/src/build-extra/please.sh make_installers_from_mingw_w64_git --version=`$(cat pkg-x86_64/ver) -o artifacts --nuget-mingit &&
openssl dgst -sha256 artifacts/Git*.nupkg | sed \"s/.* //\" >artifacts/sha-256.txt
"@
- name: Publish nuget-x86_64
uses: actions/upload-artifact@v1
with:
name: nuget-x86_64
path: artifacts

0 comments on commit a62b7f9

Please sign in to comment.