-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (41 loc) · 1.21 KB
/
build.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
40
41
42
43
44
45
46
47
48
49
50
name: build
on:
workflow_dispatch:
jobs:
rebuild:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: true
- name: update cylc-textmate-grammar submodule
run: |
git submodule status > before
git submodule update --remote
git submodule status > after
echo "Status before update: $(<before)"
echo " after update: $(<after)"
if cmp -s before after; then
echo '::warning::No update available'
exit 1
fi
- name: configure ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
- name: install
run: gem install plist
- name: build
run: |
ruby build.rb
pattern="(<span actions:bind='update-date'>).*(<\/span>)"
sed -i -E "s/${pattern}/\1$(date +%Y-%m-%d)\2/" README.md
- name: configure git
uses: cylc/release-actions/configure-git@v1
- name: commit
run: |
new_version="$(git -C cylc-textmate-grammar/ rev-parse HEAD)"
git commit -a -m "update: ${new_version}"
- name: push
run: git push