-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.28 KB
/
update-formula.yaml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: "Compile and Release on Tag Push"
on:
workflow_dispatch:
inputs:
SHA_256:
required: true
description: sha256 of the resource to download
DOWNLOAD_URL:
required: true
description: URL for the source tarball
VERSION:
required: true
description: version of the release
jobs:
update-formula:
runs-on: ubuntu-22.04
steps:
- name: "checkout"
uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_REF }}
fetch-depth: 0
- name: "update formula"
run: |
sed -i "s|url .*|url ${{ inputs.DOWNLOAD_URL }}|" Formula/templ.rb
sed -i "s|sha256 .*|sha256 ${{ inputs.SHA_256 }}|" Formula/templ.rb
sed -i "s|version .*|version ${{ inputs.VERSION }}|" Formula/templ.rb
- name: "a debug step, in github? How shocking"
run: |
git status
ls -R
- name: "commit formula"
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Bot"
git add Formula/templ.rb
git commit -m "Auto-Updater from templ: updating for ${{ inputs.VERSION }}"
git tag ${{ inputs.VERSION }}
git push
git push --tags