Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: make-ccmod-and-quick-installers | |
on: | |
release: | |
types: [created] | |
jobs: | |
sudo_make_me_an_archive: | |
name: Make a ccmod and easy installers and upload it to the release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Do what the parent description says | |
shell: sh | |
run: | | |
set -eu # ... How many KLOCs of javascript does it take to do a | |
# git fetch ? 31.3, apparently. And it still shells out to git. | |
git init | |
: fetching repository | |
git fetch --depth=1 --no-write-fetch-head --no-auto-gc \ | |
"https://github.com/${{github.repository}}" \ | |
'${{github.ref}}:${{github.ref}}' | |
: building ccmod and easy installers | |
# This is how we curl into sh. (note: sourcing a pipe is not standard) | |
git cat-file blob '${{github.ref}}:.github/workflows/release.sh' \ | |
| sh -sue '${{github.repository}}' '${{github.ref}}' | |
: uploading assets | |
url='${{github.event.release.upload_url}}' | |
url="${url%'{'*'}'}" | |
for filename in *.ccmod *loader3.zip *loader2.zip; do | |
ls -l -- "$filename" >&2 | |
cat << EOF | |
${next:+--next} | |
url="$url?name=$filename" | |
request=POST | |
data-binary="@$filename" | |
header="Content-Type: application/zip" | |
header="Authorization: token $GITHUB_TOKEN" | |
header="Accept: application/vnd.github.v3+json" | |
globoff | |
show-error | |
silent | |
fail | |
EOF | |
next=plz | |
done | curl --fail-early --config - > /dev/null | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |