-
Notifications
You must be signed in to change notification settings - Fork 12
39 lines (37 loc) · 1.11 KB
/
promote.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: Promote
on:
workflow_dispatch:
inputs:
old_version:
description: 'Old stable version'
required: true
type: string
old_sha:
description: 'Old stable sha'
required: true
type: string
new_version:
description: 'New devel version to promote'
required: true
type: string
new_sha:
description: 'New devel sha to promote'
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set Github identity
run: |
git config --global user.name clojure-build
git config --global user.email "[email protected]"
- name: Update main formula
run: |
perl -pi.bak -e "s,${{ inputs.old_version }},${{ inputs.new_version }},g" Formula/clojure.rb
perl -pi.bak -e "s,${{ inputs.old_sha }},${{ inputs.new_sha }},g" Formula/clojure.rb
git add Formula/clojure.rb
git commit --allow-empty -m "Promote ${{ inputs.new_version}} to stable"
git push