Skip to content

git-artifacts: a couple of minor fixes #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/git-artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: git-artifacts
run-name: Build git-artifacts (${{ inputs.architecture }})
run-name: Build git-artifacts (${{ inputs.artifacts != '' && format('{0} ', inputs.artifacts) || '' }}${{ inputs.architecture }})

on:
workflow_dispatch:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
pkg:
runs-on: ${{ github.event.inputs.architecture == 'aarch64' && fromJSON('["Windows", "ARM64"]') || 'windows-latest' }}
outputs:
artifact_matrix: ${{steps.artifact-build-matrix.outputs.matrix}}
artifact_matrix: ${{ steps.artifact-build-matrix.outputs.result }}
msystem: ${{steps.configure-environment.outputs.MSYSTEM}}
mingw_package_prefix: ${{steps.configure-environment.outputs.MINGW_PACKAGE_PREFIX}}
sdk_repo_arch: ${{steps.configure-environment.outputs.SDK_REPO_ARCH}}
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
try {
const output = createArtifactsMatrix(process.env.ARTIFACTS_TO_BUILD, process.env.ARCHITECTURE)
core.info(`Will be using the following matrix: ${JSON.stringify(output)}`)
core.setOutput('matrix', output)
return output
} catch (e) {
core.setFailed(e.message)
}
Expand Down Expand Up @@ -268,7 +268,8 @@ jobs:
echo '${{secrets.PRIVGPGKEY}}' | tr % '\n' | gpg $GPG_OPTIONS --import &&
info="$(gpg --list-keys --with-colons "${GPGKEY%% *}" | cut -d : -f 1,10 | sed -n '/^uid/{s|uid:||p;q}')" &&
git config --global user.name "${info% <*}" &&
git config --global user.email "<${info#*<}"
git config --global user.email "<${info#*<}" &&
echo "PACKAGER=$info" >>$GITHUB_ENV
env:
GPGKEY: ${{secrets.GPGKEY}}
- name: update check-run
Expand All @@ -287,7 +288,10 @@ jobs:
set -x
BUILD_SRC=$(test x86_64 != "$ARCHITECTURE" || echo "--build-src-pkg")
# Make sure that there is a `/usr/bin/git` that can be used by `makepkg-mingw`
printf '#!/bin/sh\n\nexec '$MINGW_PREFIX'/bin/git.exe "$@"\n' >/usr/bin/git &&
if test ! -x /usr/bin/git
then
printf '#!/bin/sh\n\nexec '$MINGW_PREFIX'/bin/git.exe "$@"\n' >/usr/bin/git
fi &&
(
cd /usr/src/MINGW-packages/mingw-w64-git/src/git &&
/usr/src/build-extra/please.sh build-mingw-w64-git --reset-pkgrel --only-$ARCHITECTURE $BUILD_SRC \
Expand All @@ -308,13 +312,14 @@ jobs:
if test -z "$EXISTING_GIT_TAG"
then
git commit -s -m "mingw-w64-git: new version ($version)" PKGBUILD &&
git bundle create "$b"/MINGW-packages.bundle origin/main..main
git bundle create "$b"/MINGW-packages.bundle origin/main..main
elif ! git update-index --ignore-submodules --refresh ||
! git diff-files --ignore-submodules ||
! git diff-index --cached --ignore-submodules HEAD
then
echo "::warning::Uncommitted changes after build!" >&2 &&
git diff >&2 &&
git commit -s -m "mingw-w64-git: new version ($version)" PKGBUILD &&
git bundle create "$b"/MINGW-packages.bundle main^..main
fi)
- name: Cache ${{env.MINGW_PACKAGE_PREFIX}}-git
Expand Down