Skip to content

Commit 1f56a37

Browse files
committed
feat: FlutterのセットアップとOSSライセンスファイルの生成を追加
1 parent 9dc893b commit 1f56a37

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/prepare-release.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ jobs:
4444
git config user.name "github-actions[bot]"
4545
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
4646
47+
- name: Set up Flutter
48+
uses: subosito/flutter-action@v2
49+
with:
50+
channel: stable
51+
cache: true
52+
53+
- name: Flutter pub get
54+
run: flutter pub get
55+
4756
- name: Read current version
4857
id: current
4958
run: |
@@ -88,6 +97,12 @@ jobs:
8897
sed -i "s/^version: .*/version: $next/" pubspec.yaml
8998
echo "Updated pubspec.yaml to $next"
9099
100+
- name: Generate OSS license file
101+
run: |
102+
# generate lib/generated/oss_licenses.dart (flutter_oss_licenses)
103+
dart run flutter_oss_licenses:generate --output lib/generated/oss_licenses.dart
104+
echo "Generated OSS licenses"
105+
91106
- name: Update CHANGELOG.md (prepend Unreleased section)
92107
run: |
93108
next='${{ steps.next.outputs.value }}'
@@ -122,7 +137,7 @@ jobs:
122137
if: ${{ github.event.inputs.dry_run == 'false' }}
123138
run: |
124139
next='${{ steps.next.outputs.value }}'
125-
git add pubspec.yaml CHANGELOG.md
140+
git add pubspec.yaml CHANGELOG.md lib/generated/oss_licenses.dart
126141
if git diff --cached --quiet; then
127142
echo "No changes to commit (version already set?)"
128143
else

0 commit comments

Comments
 (0)