forked from horde/Rdo
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add release workflow & update satis workflow
- Loading branch information
Showing
2 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
name: make release | ||
|
||
# manual workflow to make a new release for the default branch | ||
on: | ||
workflow_dispatch: | ||
branches: | ||
- FRAMEWORK_6_0 | ||
env: | ||
components: "/home/runner/.composer/web/components/bin/horde-components -c /home/runner/.composer/web/components/config/maintaina.conf.dist" | ||
COMPOSER_ALLOW_SUPERUSER: 1 | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: ['ubuntu-20.04'] | ||
php-versions: ['8.1'] | ||
steps: | ||
- name: Setup git | ||
run: | | ||
mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts | ||
git config --global user.name "Github CI Runner" | ||
git config --global user.email "ci-job@maintaina.com" | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: gettext | ||
ini-values: post_max_size=512M, max_execution_time=360 | ||
tools: composer:v2 | ||
- name: Setup composer | ||
run: | | ||
composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} | ||
composer global config repositories.0 composer https://horde-satis.maintaina.com | ||
composer global config minimum-stability dev | ||
composer config --no-plugins --global allow-plugins.horde/horde-installer-plugin true | ||
composer global require horde/horde-installer-plugin "2.3.0" | ||
composer global require horde/components "dev-FRAMEWORK_6_0" | ||
- name: write changelog | ||
run: | | ||
entries_amount=0; max_entries=100 | ||
PATTERN="^\[.*\] .*" | ||
for commit in $(git rev-list FRAMEWORK_6_0) | ||
do | ||
msg=$(git log --format=%B -n 1 $commit | head -n 1) | ||
if [ $entries_amount -gt $max_entries ]; then break; fi | ||
if [[ $msg == 'Released'* ]]; then break; fi | ||
if [[ $msg == 'Development mode for'* ]]; then break; fi | ||
if [[ $msg =~ $PATTERN ]]; then | ||
$components changed "$msg" | ||
let "entries_amount+=1" | ||
fi | ||
done | ||
- name: make release and push | ||
run: | | ||
$components release for maintaina | ||
git push | ||
git push origin --tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters