File tree Expand file tree Collapse file tree 3 files changed +92
-0
lines changed
Expand file tree Collapse file tree 3 files changed +92
-0
lines changed Original file line number Diff line number Diff line change 1+ # https://docs.github.com/en/actions
2+
3+ on :
4+ push :
5+ tags :
6+ - " **"
7+
8+ name : Release
9+
10+ jobs :
11+ release :
12+ name : Release
13+
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+
20+ - name : Install PHP with extensions
21+ uses : shivammathur/setup-php@v2
22+ with :
23+ php-version : 8.3
24+ coverage : none
25+ extensions : none
26+ tools : none
27+
28+ - name : Determine tag
29+ run : echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
30+
31+ - name : Parse ChangeLog
32+ run : build/scripts/extract-release-notes.php ${{ env.RELEASE_TAG }} > release-notes.md
33+
34+ - name : Create release
35+ uses : ncipollo/release-action@v1
36+ with :
37+ bodyFile : release-notes.md
38+ tag : ${{ env.RELEASE_TAG }}
39+ token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -17,6 +17,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
1717* ` SebastianBergmann\Diff\Line::getContent() ` and ` SebastianBergmann\Diff\Diff::getType() `
1818* Removed support for PHP 8.1
1919
20+ ## [ 5.1.1] - 2024-03-02
21+
22+ ### Changed
23+
24+ * Do not use implicitly nullable parameters
25+
2026## [ 5.1.0] - 2023-12-22
2127
2228### Added
@@ -141,6 +147,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
141147
142148[ 6.0.1 ] : https://github.com/sebastianbergmann/diff/compare/6.0.0...6.0.1
143149[ 6.0.0 ] : https://github.com/sebastianbergmann/diff/compare/5.1...6.0.0
150+ [ 5.1.1 ] : https://github.com/sebastianbergmann/diff/compare/5.1.0...5.1.1
144151[ 5.1.0 ] : https://github.com/sebastianbergmann/diff/compare/5.0.3...5.1.0
145152[ 5.0.3 ] : https://github.com/sebastianbergmann/diff/compare/5.0.2...5.0.3
146153[ 5.0.2 ] : https://github.com/sebastianbergmann/diff/compare/5.0.1...5.0.2
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env php
2+ <?php declare (strict_types=1 );
3+ if ($ argc !== 2 ) {
4+ print $ argv [0 ] . ' <tag> ' . PHP_EOL ;
5+
6+ exit (1 );
7+ }
8+
9+ $ version = $ argv [1 ];
10+
11+ $ file = __DIR__ . '/../../ChangeLog.md ' ;
12+
13+ if (!is_file ($ file ) || !is_readable ($ file )) {
14+ print $ file . ' cannot be read ' . PHP_EOL ;
15+
16+ exit (1 );
17+ }
18+
19+ $ buffer = '' ;
20+ $ append = false ;
21+
22+ foreach (file ($ file ) as $ line ) {
23+ if (str_starts_with ($ line , '## [ ' . $ version . '] ' )) {
24+ $ append = true ;
25+
26+ continue ;
27+ }
28+
29+ if ($ append && (str_starts_with ($ line , '## ' ) || str_starts_with ($ line , '[ ' ))) {
30+ break ;
31+ }
32+
33+ if ($ append ) {
34+ $ buffer .= $ line ;
35+ }
36+ }
37+
38+ $ buffer = trim ($ buffer );
39+
40+ if ($ buffer === '' ) {
41+ print 'Unable to extract release notes ' . PHP_EOL ;
42+
43+ exit (1 );
44+ }
45+
46+ print $ buffer . PHP_EOL ;
You can’t perform that action at this time.
0 commit comments