File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments