1616
1717 steps :
1818 - name : " Checkout code"
19- uses : " actions/checkout@v4 "
19+ uses : " actions/checkout@v6 "
2020 with :
2121 fetch-depth : 0
22+ persist-credentials : false
2223
2324 - name : " Resolve reference"
2425 id : " ref"
@@ -34,15 +35,29 @@ jobs:
3435 echo "is_tag=false" >> "$GITHUB_OUTPUT"
3536 fi
3637
37- - name : " Split package"
38- uses : " claudiodekker/splitsh-action@v1.0.0"
38+ - name : " Install splitsh-lite"
39+ run : |
40+ curl -sL https://github.com/splitsh/lite/releases/download/v1.0.1/lite_linux_amd64.tar.gz | tar xz -C /usr/local/bin
41+
42+ - name : " Split and push"
3943 env :
4044 GITHUB_TOKEN : ${{ secrets.SPLIT_TOKEN }}
41- with :
42- prefix : " math"
43- remote : " https://github.com/simPod/phpstan-brick-math.git"
44- reference : " ${{ steps.ref.outputs.name }}"
45- as_tag : " ${{ steps.ref.outputs.is_tag }}"
45+ REMOTE : " https://github.com/simPod/phpstan-brick-math.git"
46+ REFERENCE : ${{ steps.ref.outputs.name }}
47+ IS_TAG : ${{ steps.ref.outputs.is_tag }}
48+ run : |
49+ git config --local --unset-all http.https://github.com/.extraheader || true
50+
51+ SHA=$(splitsh-lite --prefix=math)
52+
53+ REMOTE_URL="https://x-access-token:${GITHUB_TOKEN}@github.com/simPod/phpstan-brick-math.git"
54+
55+ if [ "$IS_TAG" = "true" ]; then
56+ git tag -f "v${REFERENCE}" "$SHA"
57+ git push "$REMOTE_URL" "v${REFERENCE}"
58+ else
59+ git push "$REMOTE_URL" "$SHA:refs/heads/$REFERENCE"
60+ fi
4661
4762 split_money :
4863 name : " Split - money"
5166
5267 steps :
5368 - name : " Checkout code"
54- uses : " actions/checkout@v4 "
69+ uses : " actions/checkout@v6 "
5570 with :
5671 fetch-depth : 0
72+ persist-credentials : false
5773
5874 - name : " Resolve reference"
5975 id : " ref"
@@ -69,12 +85,26 @@ jobs:
6985 echo "is_tag=false" >> "$GITHUB_OUTPUT"
7086 fi
7187
72- - name : " Split package"
73- uses : " claudiodekker/splitsh-action@v1.0.0"
88+ - name : " Install splitsh-lite"
89+ run : |
90+ curl -sL https://github.com/splitsh/lite/releases/download/v1.0.1/lite_linux_amd64.tar.gz | tar xz -C /usr/local/bin
91+
92+ - name : " Split and push"
7493 env :
7594 GITHUB_TOKEN : ${{ secrets.SPLIT_TOKEN }}
76- with :
77- prefix : " money"
78- remote : " https://github.com/simPod/phpstan-brick-money.git"
79- reference : " ${{ steps.ref.outputs.name }}"
80- as_tag : " ${{ steps.ref.outputs.is_tag }}"
95+ REMOTE : " https://github.com/simPod/phpstan-brick-money.git"
96+ REFERENCE : ${{ steps.ref.outputs.name }}
97+ IS_TAG : ${{ steps.ref.outputs.is_tag }}
98+ run : |
99+ git config --local --unset-all http.https://github.com/.extraheader || true
100+
101+ SHA=$(splitsh-lite --prefix=money)
102+
103+ REMOTE_URL="https://x-access-token:${GITHUB_TOKEN}@github.com/simPod/phpstan-brick-money.git"
104+
105+ if [ "$IS_TAG" = "true" ]; then
106+ git tag -f "v${REFERENCE}" "$SHA"
107+ git push "$REMOTE_URL" "v${REFERENCE}"
108+ else
109+ git push "$REMOTE_URL" "$SHA:refs/heads/$REFERENCE"
110+ fi
0 commit comments