-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.14 KB
/
release.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
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Release
on:
workflow_dispatch:
inputs:
url:
description: "New Formula URL"
required: true
type: string
sha256:
description: "New Formula SHA256"
required: true
type: string
version:
description: "New Formula VERSION"
required: true
type: string
version_test:
description: "New Formula VERSION check"
type: string
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bump Formula
run: |
sed -i -e 's#url ".*"#url "${{ inputs.url }}"#' \
-e 's/sha256 ".*"/sha256 "${{ inputs.sha256 }}"/' \
-e 's/version ".*"/version "${{ inputs.version }}"/' \
-e 's/assert_equal ".*",/assert_equal "${{ inputs.version_test || inputs.version }}",/' \
Formula/lucky.rb
- name: Create PR
uses: peter-evans/create-pull-request@v6
with:
branch: "release/${{ inputs.version }}"
title: "Release ${{ inputs.version }}"
commit-message: "release: bump to ${{ inputs.version }}"