Skip to content

v0.8.2

v0.8.2 #16

Workflow file for this run

name: cd
on:
release:
types: [published]
workflow_dispatch:
jobs:
update-download-redirect:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: gh-pages
- name: generate download.html
id: meta
env:
GH_TOKEN: ${{ github.token }}
run: |
url=$(gh release view --json assets | jq -r '.assets[]? | select(.name | endswith(".dmg")) | .url')
v=$(gh release view --json tagName --jq .tagName)
echo "::set-output name=v::$v"
cat <<-EOS > download.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="refresh" content="0; URL='$url'">
<title>Downloading teaBASE-$v.dmg&hellip;</title>
</head>
<body>
<p>Downloading <a href="$url">$url</a>&hellip;</p>
</body>
</html>
EOS
- uses: fregante/setup-git-user@v2
- run: |
git add download.html
git commit --message 'Update download.html for ${{ steps.meta.outputs.v }}'
git push origin gh-pages