File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 5050 run : |
5151 mkdir -p hlp
5252 mkdir -p hlp-user
53+ mkdir -p hlp-aguide
5354
5455 - name : Download all zip assets from HelpViewer/helpHello
5556 env :
8586 "$url" -o "$hlpdir/$name"
8687 done
8788
89+ _reponame=helpAuthorsGuide
90+ api_url="https://api.github.com/repos/HelpViewer/$_reponame/releases/latest"
91+ release=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "$api_url")
92+ hlpdir=hlp-aguide
93+
94+ echo "$release" | jq -c '.assets[] | select(.name | endswith(".zip"))' | while read asset; do
95+ name=$(echo "$asset" | jq -r '.name')
96+ url=$(echo "$asset" | jq -r '.url')
97+ echo "Downloading $name..."
98+ curl -L -H "Accept: application/octet-stream" \
99+ -H "Authorization: token $GITHUB_TOKEN" \
100+ "$url" -o "$hlpdir/$name"
101+ done
102+
88103 - name : Commit and push changes
89104 run : |
90105 git config user.name "github-actions[bot]"
You can’t perform that action at this time.
0 commit comments