Skip to content

Commit eaf302b

Browse files
midahpralflang
authored andcommitted
added release workflow
1 parent f685a04 commit eaf302b

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

.github/workflows/release.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
name: make release
3+
4+
# manual workflow to make a new release for the default branch
5+
on:
6+
workflow_dispatch:
7+
branches:
8+
- FRAMEWORK_6_0
9+
env:
10+
components: "/home/runner/.composer/web/components/bin/horde-components -c /home/runner/.composer/web/components/config/maintaina.conf.dist"
11+
12+
jobs:
13+
run:
14+
runs-on: ${{ matrix.operating-system }}
15+
strategy:
16+
matrix:
17+
operating-system: ['ubuntu-20.04']
18+
php-versions: ['8.1']
19+
steps:
20+
- name: Setup git
21+
run: |
22+
mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
23+
git config --global user.name "Github CI Runner"
24+
git config --global user.email "[email protected]"
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
with:
28+
fetch-depth: 0
29+
- name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php-versions }}
33+
extensions: gettext
34+
ini-values: post_max_size=512M, max_execution_time=360
35+
tools: composer:v2
36+
- name: Setup composer
37+
run: |
38+
composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
39+
composer global config repositories.0 composer https://horde-satis.maintaina.com
40+
composer global config minimum-stability dev
41+
composer config --no-plugins --global allow-plugins.horde/horde-installer-plugin true
42+
composer global require horde/horde-installer-plugin "2.3.0"
43+
composer global require horde/components "dev-FRAMEWORK_6_0"
44+
- name: write changelog
45+
run: |
46+
entries_amount=0; max_entries=100
47+
PATTERN="^\[.*\] .*"
48+
49+
for commit in $(git rev-list FRAMEWORK_6_0)
50+
do
51+
msg=$(git log --format=%B -n 1 $commit | head -n 1)
52+
if [ $entries_amount -gt $max_entries ]; then break; fi
53+
if [[ $msg == 'Released'* ]]; then break; fi
54+
if [[ $msg == 'Development mode for'* ]]; then break; fi
55+
if [[ $msg =~ $PATTERN ]]; then
56+
$components changed "$msg"
57+
let "entries_amount+=1"
58+
fi
59+
done
60+
- name: make release and push
61+
run: |
62+
$components release for maintaina
63+
git push
64+
git push origin --tags

0 commit comments

Comments
 (0)