Skip to content

Commit

Permalink
Add update.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkleeman committed Jan 2, 2024
1 parent 7cc611f commit 1185d1e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Update Restate version

on:
workflow_call:
workflow_dispatch:

jobs:
publish-release:
name: Publish release
runs-on: ubuntu-latest

steps:
- name: setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- run: ./release/release.sh
- run: git push origin main
10 changes: 9 additions & 1 deletion release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@ linux_x86=$(curl --silent --location --fail "https://github.com/restatedev/resta
linux_arm64=$(curl --silent --location --fail "https://github.com/restatedev/restate/releases/download/v${version}/restate.aarch64-unknown-linux-gnu.tar.gz" | sha256sum | awk '{print $1}')
export version darwin_x86 darwin_arm64 linux_x86 linux_arm64

envsubst < "${SCRIPT_DIR}/restate.rb.tmpl" > "${SCRIPT_DIR}/../formula/restate.rb"
envsubst < "${SCRIPT_DIR}/restate.rb.tmpl" > "${SCRIPT_DIR}/../Formula/restate.rb"

git -C "${SCRIPT_DIR}/.." reset
git -C "${SCRIPT_DIR}/.." add "Formula/restate.rb"
if git diff --cached --exit-code; then
echo "Nothing to commit"
else
git -C "${SCRIPT_DIR}/.." commit -m "Update to ${version}"
fi

0 comments on commit 1185d1e

Please sign in to comment.