@@ -50,19 +50,27 @@ jobs:
5050 find scoop-bucket -maxdepth 4 -type f | sort
5151 exit 1
5252 fi
53- SCOOP_ROOT=$(git -C "$(dirname "$SCOOP_JSON")" rev-parse --show-toplevel)
53+ echo "Found: $SCOOP_JSON"
54+ SCOOP_ROOT=$(git -C "$(dirname "$SCOOP_JSON")" rev-parse --show-toplevel 2>/dev/null || dirname "$(dirname "$SCOOP_JSON")")
55+ echo "SCOOP_ROOT=$SCOOP_ROOT"
56+ echo "SCOOP_JSON=$SCOOP_JSON"
5457 sed -i "s/\"version\": \".*\"/\"version\": \"${VERSION}\"/" "$SCOOP_JSON"
5558 sed -i "s/\"hash\": \".*\"/\"hash\": \"${HASH}\"/" "$SCOOP_JSON"
5659 sed -i "s|releases/download/.*/retrobasic-windows-x86_64.zip|releases/download/${TAG}/retrobasic-windows-x86_64.zip|" "$SCOOP_JSON"
57- echo "SCOOP_ROOT=$SCOOP_ROOT " >> $GITHUB_ENV
60+ echo "SCOOP_JSON=$SCOOP_JSON " >> $GITHUB_ENV
5861
5962 - name : Commit & push updates
6063 env :
6164 GH_TOKEN : ${{ secrets.HOMEBREW_AND_SCOOP_TOKEN }}
6265 run : |
63- git -C "$SCOOP_ROOT" config user.name github-actions
64- git -C "$SCOOP_ROOT" config user.email github-actions@github.com
65- git -C "$SCOOP_ROOT" remote set-url origin "https://x-access-token:${{ secrets.HOMEBREW_AND_SCOOP_TOKEN }}@github.com/maurymarkowitz/scoop-bucket.git"
66- git -C "$SCOOP_ROOT" add bucket/retrobasic.json
67- git -C "$SCOOP_ROOT" commit -m "Update scoop manifest for ${{ github.event.release.tag_name || github.event.inputs.tag_name }}"
68- git -C "$SCOOP_ROOT" push
66+ SCOOP_JSON="${{ env.SCOOP_JSON }}"
67+ SCOOP_DIR=$(dirname "$(dirname "$SCOOP_JSON")")
68+ echo "Using SCOOP_JSON=$SCOOP_JSON"
69+ echo "Using SCOOP_DIR=$SCOOP_DIR"
70+ cd "$SCOOP_DIR" || exit 1
71+ git config user.name github-actions
72+ git config user.email github-actions@github.com
73+ git remote set-url origin "https://x-access-token:${{ secrets.HOMEBREW_AND_SCOOP_TOKEN }}@github.com/maurymarkowitz/scoop-bucket.git"
74+ git add bucket/retrobasic.json
75+ git commit -m "Update scoop manifest for ${{ github.event.release.tag_name || github.event.inputs.tag_name }}"
76+ git push
0 commit comments