Compare commits

...

4 Commits

Author SHA1 Message Date
Bartek Pacia
0ca7a949e7 Remove macos-13 (Intel) runner from CI (#388)
macos-13 was retired by GitHub in December 2025 and no longer works.
Intel-based macOS runners are being phased out entirely by GitHub,
with only expensive *-large variants remaining as alternatives.

Closes #387

Made-with: Cursor
2026-03-17 13:23:10 +01:00
Azincc
de04a6aaec Upgrade actions/cache to v5 (#385) 2026-03-16 15:24:34 +07:00
Nicholas Beninato
fd55f4c5af Support dynamic values for PUB-CACHE-PATH (#363)
* use expand_key for PUB_CACHE_PATH

* add tests

* add dash

* use PUB_CACHE
2025-06-24 23:50:48 +02:00
Bartek Pacia
ca16aee0c3 fix broken links in README (#365) 2025-06-24 23:48:20 +02:00
4 changed files with 23 additions and 11 deletions

View File

@@ -30,7 +30,6 @@ jobs:
- ubuntu-latest
- windows-latest
- macos-latest
- macos-13
channel: [stable, beta, master]
dry-run: [true, false]
git-source:
@@ -80,7 +79,7 @@ jobs:
strategy:
matrix:
operating-system:
[ubuntu-latest, windows-latest, macos-latest, macos-13]
[ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Clone repository
@@ -207,6 +206,10 @@ jobs:
shell: bash
- run: ./setup.sh -t -p -c '/tmp/flutter/:channel:-:version:-:hash:' | grep '/tmp/flutter/stable-3.7.7-2ad6cd72c040113b47ee9055e722606a490ef0da'
shell: bash
- run: ./setup.sh -t -p -d '/tmp/flutter/:channel:-:version:-:hash:-pub-cache-path' | grep '/tmp/flutter/stable-3.7.7-2ad6cd72c040113b47ee9055e722606a490ef0da-pub-cache-path'
shell: bash
- run: ./setup.sh -t -p -l '/tmp/flutter/:channel:-:version:-:hash:-pub-cache-key' | grep '/tmp/flutter/stable-3.7.7-2ad6cd72c040113b47ee9055e722606a490ef0da-pub-cache-key'
shell: bash
test_print_output_arm64:
@@ -276,3 +279,7 @@ jobs:
shell: bash
- run: ./setup.sh -t -p -c '/tmp/flutter/:channel:-:version:-:hash:' | grep '/tmp/flutter/stable-3.7.7-2ad6cd72c040113b47ee9055e722606a490ef0da'
shell: bash
- run: ./setup.sh -t -p -d '/tmp/flutter/:channel:-:version:-:hash:-pub-cache-path' | grep '/tmp/flutter/stable-3.7.7-2ad6cd72c040113b47ee9055e722606a490ef0da-pub-cache-path'
shell: bash
- run: ./setup.sh -t -p -l '/tmp/flutter/:channel:-:version:-:hash:-pub-cache-key' | grep '/tmp/flutter/stable-3.7.7-2ad6cd72c040113b47ee9055e722606a490ef0da-pub-cache-key'
shell: bash

View File

@@ -308,6 +308,11 @@ jobs:
Integration with [`actions/cache`](https://github.com/actions/cache):
> [!IMPORTANT]
> `subosito/flutter-action` now uses `actions/cache@v5` internally. If you use
> self-hosted runners, make sure they are updated to Actions Runner
> `2.327.1` or newer before enabling cache support.
```yaml
steps:
- name: Clone repository
@@ -320,7 +325,7 @@ steps:
# optional parameters follow
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache of dart pub get dependencies
pub-cache-key: "flutter-pub-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache of dart pub get dependencies
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
- run: flutter --version
```
@@ -338,12 +343,12 @@ dynamic values:
### Using cache outputs
> [!NOTE]
> `PUB-CACHE-HIT` and `CACHE-HIT` directly use the `cache-hit` output from `actions/cache@v4`, which is the following:
> `PUB-CACHE-HIT` and `CACHE-HIT` directly use the `cache-hit` output from `actions/cache@v5`, which is the following:
> - `cache-hit` - A string value to indicate an exact match was found for the key.
> - If there's a cache hit, this will be 'true' or 'false' to indicate if there's an exact match for `key`.
> - If there's a cache miss, this will be an empty string.
Example usage (inspired by [actions/cache@v4](https://github.com/actions/cache/blob/c45d39173a637a28edbd526cb160189cc4e84f5a/README.md#skipping-steps-based-on-cache-hit) and [#346](https://github.com/subosito/flutter-action/pull/346)) to skip `melos bootstrap` if there was a pub cache hit:
Example usage (inspired by [actions/cache@v5](https://github.com/actions/cache/blob/v5/README.md#skipping-steps-based-on-cache-hit) and [#346](https://github.com/subosito/flutter-action/pull/346)) to skip `melos bootstrap` if there was a pub cache hit:
```
steps:
@@ -418,6 +423,5 @@ steps:
shell: bash
```
[Alif Rachmawadi](https://github.com/subosito)
[Bartek Pacia](https://github.com/bartekpacia)
[Alif Rachmawadi]: https://github.com/subosito
[Bartek Pacia]: https://github.com/bartekpacia

View File

@@ -116,14 +116,14 @@ runs:
- name: Cache Flutter
id: cache-flutter
uses: actions/cache@v4
uses: actions/cache@v5
if: ${{ inputs.cache == 'true' }}
with:
path: ${{ steps.flutter-action.outputs.CACHE-PATH }}
key: ${{ steps.flutter-action.outputs.CACHE-KEY }}
- name: Cache pub dependencies
uses: actions/cache@v4
uses: actions/cache@v5
id: cache-pub
if: ${{ inputs.cache == 'true' }}
with:

View File

@@ -97,7 +97,7 @@ while getopts 'tc:k:d:l:pa:n:f:g:' flag; do
exit 1
fi
;;
g) GIT_SOURCE="$OPTARG" ;;
g) GIT_SOURCE="$OPTARG" ;;
?) exit 2 ;;
esac
done
@@ -180,6 +180,7 @@ expand_key() {
CACHE_KEY=$(expand_key "$CACHE_KEY")
PUB_CACHE_KEY=$(expand_key "$PUB_CACHE_KEY")
CACHE_PATH=$(expand_key "$(transform_path "$CACHE_PATH")")
PUB_CACHE=$(expand_key "$(transform_path "$PUB_CACHE")")
if [ "$PRINT_ONLY" = true ]; then
version_info=$(echo "$VERSION_MANIFEST" | jq -j '.channel,":",.version,":",.dart_sdk_arch // "x64"')