-
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (43 loc) · 1.48 KB
/
readme.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: "Update Readme"
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- '.github/tpl/*'
- '.github/data/*'
- '.github/workflows/readme.yml'
release:
types: [ published ]
jobs:
readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get latest release
id: get-latest-release
uses: InsonusK/[email protected]
with:
myToken: ${{ github.token }}
view_top: 1
- name: Using main branch
run: |
git switch main || (git fetch --all && git checkout -b main origin/main)
. conf/default.release.conf
echo "DEFAULT_RELEASE=$DEFAULT_RELEASE" >> $GITHUB_ENV
echo "LATEST_MAJOR=$(echo ${{ steps.get-latest-release.outputs.tag_name }} | cut -d . -f 1)" >> $GITHUB_ENV
echo "LATEST_TAG=${{ steps.get-latest-release.outputs.tag_name }}" >> $GITHUB_ENV
echo "ALL_RELEASES=$(ls conf/ | grep -v default | sed 's/.conf//g' | tr '\n' ',' | sed "s/,\$//" | sed 's/,/, /g')" >> $GITHUB_ENV
- name: Update the readme.md
uses: vmactions/[email protected]
with:
datafile: .github/data/datafile.ini
files: |
.github/tpl/README.tpl.md : README.md
- uses: EndBug/add-and-commit@v9
with:
message: "Update version to ${{ steps.get-latest-release.outputs.tag_name }}"
pull: '--rebase --autostash '
add: |
README.md