Skip to content

Commit 0995f6b

Browse files
authored
Update schedule.yml
1 parent 9254f29 commit 0995f6b

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

.github/workflows/schedule.yml

+14-11
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
channel: [stable, beta, dev]
25+
channel: [stable, beta, dev, edge]
2626

2727
outputs:
2828
stable-version: ${{ steps.version.outputs.stable-version }}
@@ -31,24 +31,27 @@ jobs:
3131
beta-cache-hit: ${{ steps.cache.outputs.beta-cache-hit }}
3232
dev-version: ${{ steps.version.outputs.dev-version }}
3333
dev-cache-hit: ${{ steps.cache.outputs.dev-cache-hit }}
34+
edge-version: ${{ steps.version.outputs.edge-version }}
3435

3536
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-
4037
- name: Get ${{ matrix.channel }} version
41-
id: version
4238
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
4446
4547
- name: Cache
4648
id: cache
49+
if: matrix.channel != 'edge'
4750
run: |
4851
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"
5053
else
51-
echo "${{ matrix.channel }}-cache-hit=false" | tee -a $GITHUB_OUTPUT
54+
echo "${{ matrix.channel }}-cache-hit=false" | tee -a "$GITHUB_OUTPUT"
5255
fi
5356
5457
stable:
@@ -75,8 +78,8 @@ jobs:
7578
ref: ${{ needs.latest.outputs.dev-version }}
7679
secrets: inherit
7780

78-
main:
81+
edge:
7982
needs: [latest]
8083
uses: ./.github/workflows/build.yml
8184
with:
82-
ref: main
85+
ref: ${{ needs.latest.outputs.edge-version }}

0 commit comments

Comments
 (0)