Skip to content

Commit b8965cd

Browse files
committed
0.2.5
1 parent 0f44152 commit b8965cd

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/publish.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,19 @@ jobs:
2121
- name: Install Dependencies
2222
run: flutter pub get
2323

24-
# 👇 THIS IS THE FIX. It writes the key you just found to the disk.
24+
# 👇 FIXED: We use a local folder and force ENV variables
2525
- name: Create Credentials File
2626
run: |
27-
mkdir -p ~/.pub-cache
28-
cat <<EOF > ~/.pub-cache/credentials.json
27+
# Create a local folder in the workspace
28+
mkdir -p $GITHUB_WORKSPACE/pub_cache
29+
30+
# Write the secret to credentials.json in that folder
31+
cat <<EOF > $GITHUB_WORKSPACE/pub_cache/credentials.json
2932
${{ secrets.PUB_CREDENTIALS }}
3033
EOF
31-
34+
3235
- name: Publish Package
36+
# 👇 We explicitly tell Flutter to use our local folder as the cache
37+
env:
38+
PUB_CACHE: ${{ github.workspace }}/pub_cache
3339
run: flutter pub publish --force

0 commit comments

Comments
 (0)