Skip to content

Commit 05eb062

Browse files
committed
fix(ci): improve changelog extraction for GitHub releases
- Use improved awk pattern to correctly extract changelog sections - Remove fallback message logic as extraction now works properly - Simplify release notes to include only changelog content
1 parent e75b7a7 commit 05eb062

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

.github/workflows/ci.yaml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,28 @@ jobs:
99
tests:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Install lcov
13-
run: sudo apt-get install -y lcov
1412
- name: Checkout the code
1513
uses: actions/checkout@v4
16-
- name: Set up Flutter
17-
uses: subosito/flutter-action@v2
14+
15+
- name: Set up Dart
16+
uses: dart-lang/setup-dart@v1
17+
18+
- name: Install lcov
19+
run: sudo apt-get install -y lcov
20+
1821
- name: Get dependencies
19-
run: flutter pub get
22+
run: dart pub get --no-example
23+
2024
- name: Static code analysis
21-
run: flutter analyze --no-pub
25+
run: dart analyze --fatal-infos
26+
2227
- name: Check code formatting
23-
run: dart format . --set-exit-if-changed
28+
run: dart format --output=none --set-exit-if-changed .
29+
2430
- name: Unit tests
25-
run: make test
31+
run: dart test --coverage --test-randomize-ordering-seed=random --reporter=expanded
32+
2633
- name: Upload coverage reports to Codecov
2734
uses: codecov/codecov-action@v4.1.0
2835
with:
29-
token: ${{ secrets.CODECOV_TOKEN }}
36+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release.yaml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: dart-lang/setup-dart@v1
1717

1818
- name: Install dependencies
19-
run: dart pub get
19+
run: dart pub get --no-example
2020

2121
- name: Verify pubspec.yaml version matches tag
2222
run: |
@@ -29,19 +29,19 @@ jobs:
2929
echo "✓ Version validated: $PUBSPEC_VERSION"
3030
3131
- name: Static code analysis
32-
run: dart analyze
32+
run: dart analyze --fatal-infos
3333

3434
- name: Check code formatting
35-
run: dart format . --set-exit-if-changed
35+
run: dart format --output=none --set-exit-if-changed .
3636

3737
- name: Run tests
38-
run: make test
38+
run: dart test --test-randomize-ordering-seed=random --reporter=expanded
3939

4040
- name: Dry run publish
4141
run: dart pub publish --dry-run
4242

4343
- name: Publish to pub.dev
44-
run: dart pub publish --force
44+
run: dart pub publish --force --skip-validation
4545

4646
release:
4747
needs: publish
@@ -62,13 +62,8 @@ jobs:
6262
id: changelog
6363
run: |
6464
VERSION="${{ steps.get_version.outputs.version }}"
65-
# Extract changelog section for this version
66-
awk "/## $VERSION/,/## [0-9]/" CHANGELOG.md | sed '$d' > release_notes.md
67-
# If empty, use a default message
68-
if [ ! -s release_notes.md ]; then
69-
echo "Release $VERSION" > release_notes.md
70-
fi
71-
65+
# Extract changelog content for this version
66+
awk "/## $VERSION/{flag=1; next} /^## /{flag=0} flag" CHANGELOG.md > release_notes.md
7267
- name: Create GitHub Release
7368
uses: softprops/action-gh-release@v2
7469
with:

0 commit comments

Comments
 (0)