Skip to content

Commit e76ef33

Browse files
committed
build: export pub environment variable
1 parent ec3a237 commit e76ef33

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ jobs:
88
name: Build & Release
99
runs-on: windows-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212
- uses: subosito/flutter-action@v2
1313
with:
1414
channel: 'stable'
1515
cache: true
1616

17+
# https://github.com/subosito/flutter-action/issues/278
18+
- name: Export pub environment variable
19+
run: |
20+
if [ "$RUNNER_OS" == "Windows" ]; then
21+
echo "PUB_CACHE=$LOCALAPPDATA\\Pub\\Cache" >> $GITHUB_ENV
22+
fi
23+
shell: bash
24+
1725
- run: echo "NEW_VERSION=${{ github.ref_name }}" | Out-File -FilePath $env:GITHUB_ENV -Append
1826

1927
- name: Bump MyAppVersion in Inno Setup
@@ -23,8 +31,6 @@ jobs:
2331

2432
- run: flutter gen-l10n
2533

26-
- run: flutter pub cache clean
27-
2834
- run: dart run build_runner build --delete-conflicting-outputs
2935

3036
- run: flutter build windows --build-name=${{ env.NEW_VERSION }} --build-number=1

0 commit comments

Comments
 (0)