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,27 @@ 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
- id : version
42
38
run : |
43
- echo "${{ matrix.channel }}-version=$(yq .version VERSION)" | tee -a $GITHUB_OUTPUT
39
+ if ${{ matrix.channel == 'edge' && 'true' || 'false' }}; then
40
+ git ls-remote https://dart.googlesource.com/sdk.git HEAD | tee HEAD
41
+ echo "${{ matrix.channel }}-version=$(cut -f 1 HEAD)" | tee -a "$GITHUB_OUTPUT"
42
+ else
43
+ curl -fsSL "https://storage.googleapis.com/dart-archive/channels/${{ matrix.channel }}/release/latest/VERSION" | tee VERSION
44
+ echo "${{ matrix.channel }}-version=$(yq .version VERSION)" | tee -a "$GITHUB_OUTPUT"
45
+ fi
44
46
45
47
- name : Cache
46
48
id : cache
49
+ if : matrix.channel != 'edge'
47
50
run : |
48
51
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
52
+ echo "${{ matrix.channel }}-cache-hit=true" | tee -a " $GITHUB_OUTPUT"
50
53
else
51
- echo "${{ matrix.channel }}-cache-hit=false" | tee -a $GITHUB_OUTPUT
54
+ echo "${{ matrix.channel }}-cache-hit=false" | tee -a " $GITHUB_OUTPUT"
52
55
fi
53
56
54
57
stable :
75
78
ref : ${{ needs.latest.outputs.dev-version }}
76
79
secrets : inherit
77
80
78
- main :
81
+ edge :
79
82
needs : [latest]
80
83
uses : ./.github/workflows/build.yml
81
84
with :
82
- ref : main
85
+ ref : ${{ needs.latest.outputs.edge-version }}
0 commit comments