-
Notifications
You must be signed in to change notification settings - Fork 1
26 lines (26 loc) · 1.05 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: Update lunatic
on:
workflow_dispatch:
inputs:
version:
description: "Latest lunatic version (e.g. 0.6.32)"
required: true
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: "Check out repository"
uses: actions/checkout@v2
with:
ref: "main"
- name: "Update version"
run: |
wget https://github.com/lunatic-solutions/lunatic/releases/download/v${{ github.event.inputs.version }}/lunatic-macos-universal.tar.gz
export SHA256=$(shasum -a 256 lunatic-macos-universal.tar.gz | cut -d ' ' -f 1)
sed -i -E 's/[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/${{ github.event.inputs.version }}/' Formula/lunatic.rb
sed -i -E 's/sha256 .+/sha256 "'$SHA256'"/' Formula/lunatic.rb
git config --global user.name "Github Action 'Update lunatic' workflow"
git config --global user.email "bernard@lunatic.solutions"
git add Formula/lunatic.rb
git commit -m "Update to ${{ github.event.inputs.version }}"
git push