ci: install Git in package publisher

This commit is contained in:
ShrinkSDK Automation
2026-08-26 03:09:47 +08:00
parent 2e8cc588c4
commit 82ede99d5d
+11 -1
View File
@@ -15,6 +15,16 @@ jobs:
env: env:
NODE_AUTH_TOKEN: ${{ secrets.SHRINKSDK_PACKAGE_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.SHRINKSDK_PACKAGE_TOKEN }}
steps: steps:
- name: Install Git
shell: bash
run: |
set -eu
if ! command -v git >/dev/null 2>&1; then
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git ca-certificates
rm -rf /var/lib/apt/lists/*
fi
- name: Fetch tagged revision - name: Fetch tagged revision
shell: bash shell: bash
run: | run: |
@@ -23,7 +33,7 @@ jobs:
test -n "$ref" test -n "$ref"
git init . git init .
git remote add origin "https://git.crash.work/ShrinkSDK/ShrinkContext.AppAdapter.git" git remote add origin "https://git.crash.work/ShrinkSDK/ShrinkContext.AppAdapter.git"
git fetch --depth=1 origin "$ref" git fetch --depth=1 --tags origin "$ref"
git checkout --detach FETCH_HEAD git checkout --detach FETCH_HEAD
- name: Validate immutable release version - name: Validate immutable release version