22
22
strategy :
23
23
fail-fast : false
24
24
matrix :
25
- channel : [stable, beta, dev]
25
+ channel : [stable, beta, dev, edge ]
26
26
27
27
outputs :
28
28
stable-version : ${{ steps.version.outputs.stable-version }}
@@ -31,24 +31,28 @@ jobs:
31
31
beta-cache-hit : ${{ steps.cache.outputs.beta-cache-hit }}
32
32
dev-version : ${{ steps.version.outputs.dev-version }}
33
33
dev-cache-hit : ${{ steps.cache.outputs.dev-cache-hit }}
34
+ edge-version : ${{ steps.version.outputs.edge-version }}
34
35
35
36
steps :
36
- - name : Get ${{ matrix.channel }} release
37
- run : |
38
- curl -fsSL "https://storage.googleapis.com/dart-archive/channels/${{ matrix.channel }}/release/latest/VERSION" | tee VERSION
39
-
40
37
- name : Get ${{ matrix.channel }} version
41
38
id : version
42
39
run : |
43
- echo "${{ matrix.channel }}-version=$(yq .version VERSION)" | tee -a $GITHUB_OUTPUT
40
+ if ${{ matrix.channel == 'edge' && 'true' || 'false' }}; then
41
+ git ls-remote https://dart.googlesource.com/sdk.git HEAD | tee HEAD
42
+ echo "${{ matrix.channel }}-version=$(cut -f 1 HEAD)" | tee -a "$GITHUB_OUTPUT"
43
+ else
44
+ curl -fsSL "https://storage.googleapis.com/dart-archive/channels/${{ matrix.channel }}/release/latest/VERSION" | tee VERSION
45
+ echo "${{ matrix.channel }}-version=$(yq .version VERSION)" | tee -a "$GITHUB_OUTPUT"
46
+ fi
44
47
45
48
- name : Cache
46
49
id : cache
50
+ if : matrix.channel != 'edge'
47
51
run : |
48
52
if ${{ github.event.schedule && 'true' || 'false' }} && curl -fsSLo /dev/null "${{ github.server_url }}/${{ github.repository }}/releases/tag/$(yq .version VERSION)"; then
49
- echo "${{ matrix.channel }}-cache-hit=true" | tee -a $GITHUB_OUTPUT
53
+ echo "${{ matrix.channel }}-cache-hit=true" | tee -a " $GITHUB_OUTPUT"
50
54
else
51
- echo "${{ matrix.channel }}-cache-hit=false" | tee -a $GITHUB_OUTPUT
55
+ echo "${{ matrix.channel }}-cache-hit=false" | tee -a " $GITHUB_OUTPUT"
52
56
fi
53
57
54
58
stable :
75
79
ref : ${{ needs.latest.outputs.dev-version }}
76
80
secrets : inherit
77
81
78
- main :
82
+ edge :
79
83
needs : [latest]
80
84
uses : ./.github/workflows/build.yml
81
85
with :
82
- ref : main
86
+ ref : ${{ needs.latest.outputs.edge-version }}
0 commit comments