Skip to content

release 0.5.23

release 0.5.23 #60

Workflow file for this run

name: "release"
run-name: "release ${{inputs.version}}"
on:
workflow_dispatch:
inputs:
version:
description: 'Release Version'
required: true
type: string
jobs:
update_formula:
name: "update_formula"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- name: "Download artifacts and bump homebrew version"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export version="${{inputs.version}}"
tries=36
for (( i = 0; i < $tries; i++ )); do
# It's possible for this job to be kicked off before the release has been created,
# We'll keep trying for 2 hrs, since Windows can take a long time to build.
if gh release download --repo unisonweb/unison "release/${version}" --pattern "ucm-*" ; then
break
fi
echo "Couldn't download release artifacts, release may not yet exist. Trying again in 5 minutes."
sleep 300 # If we failed, wait for 5 minutes
done
export linux_sha=$(shasum -a 256 < ucm-linux.tar.gz | cut -f1 -d" ")
export macos_sha=$(shasum -a 256 < ucm-macos.tar.gz | cut -f1 -d" ")
# Generate formula with correct version and SHAs.
envsubst '$version $linux_sha $macos_sha' < unison-language.template.rb > unison-language.rb
# Git complains if we don't have an author.
git config --global user.email "[email protected]"
git config --global user.name "Unison Bot 🤖"
git add unison-language.rb
git commit -m "release/${version}"
git push origin master