Skip to content

Commit bd6d46b

Browse files
authored
Update schedule.yml
1 parent 5d0b543 commit bd6d46b

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

.github/workflows/schedule.yml

Lines changed: 14 additions & 10 deletions
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,28 @@ 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
4138
id: version
4239
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
4447
4548
- name: Cache
4649
id: cache
50+
if: matrix.channel != 'edge'
4751
run: |
4852
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"
5054
else
51-
echo "${{ matrix.channel }}-cache-hit=false" | tee -a $GITHUB_OUTPUT
55+
echo "${{ matrix.channel }}-cache-hit=false" | tee -a "$GITHUB_OUTPUT"
5256
fi
5357
5458
stable:
@@ -75,8 +79,8 @@ jobs:
7579
ref: ${{ needs.latest.outputs.dev-version }}
7680
secrets: inherit
7781

78-
main:
82+
edge:
7983
needs: [latest]
8084
uses: ./.github/workflows/build.yml
8185
with:
82-
ref: main
86+
ref: ${{ needs.latest.outputs.edge-version }}

0 commit comments

Comments
 (0)