2
2
3
3
[ ![ Dart] ( https://github.com/dart-lang/setup-dart/workflows/Dart/badge.svg )] ( https://github.com/dart-lang/setup-dart/actions?query=workflow%3A%22Dart%22+branch%3Amain )
4
4
5
- This [ GitHub Action] ( https://github.com/dart-lang/setup-dart ) installs and sets up of a Dart SDK for use in actions by:
5
+ This [ GitHub Action] ( https://github.com/dart-lang/setup-dart ) installs
6
+ and sets up of a Dart SDK for use in actions by:
6
7
7
8
* Downloading the Dart SDK
8
- * Adding the [ ` dart ` ] ( https://dart.dev/tools/dart-tool ) command and ` pub ` cache to path
9
+ * Adding the [ ` dart ` ] ( https://dart.dev/tools/dart-tool ) command
10
+ and [ ` pub ` cache] ( https://dart.dev/tools/pub/cmd/pub-get#the-system-package-cache )
11
+ to the system path
9
12
10
13
# Usage
11
14
@@ -16,19 +19,20 @@ The action takes the following inputs:
16
19
* ` sdk ` : Which SDK version to setup. Can be specified using one of two forms:
17
20
* A specific SDK version, e.g. ` 2.7.2 ` or ` 2.12.0-1.4.beta `
18
21
* A release channel, which will install the latest build from that channel.
19
- Available channels are ` stable ` , ` beta ` , ` dev ` , and ` main ` . See
20
- https://dart.dev/tools/sdk/ archive for details.
22
+ Available channels are ` stable ` , ` beta ` , ` dev ` , and ` main ` .
23
+ See the [ Dart SDK archive ] ( https://dart.dev/get-dart/ archive ) for details.
21
24
22
25
* ` flavor ` : Which build flavor to setup.
23
- * Avaliable build flavors are ` raw ` and ` release ` .
26
+ * Available build flavors are ` raw ` and ` release ` .
24
27
* ` release ` flavor contains published builds.
25
28
* ` raw ` flavor contains unpublished builds, which can be used by developers
26
29
to test against SDK versions before a release.
27
30
* ` main ` release channel only supports ` raw ` build flavor.
28
31
29
32
* ` architecture ` : The CPU architecture to setup support for. Valid options are
30
33
` x64 ` , ` ia32 ` , ` arm ` , and ` arm64 ` . Note that not all CPU architectures are
31
- supported on all operating systems; see https://dart.dev/tools/sdk/archive
34
+ supported on all operating systems; see the
35
+ [ Dart system requirements] ( https://dart.dev/get-dart#system-requirements )
32
36
for valid combinations.
33
37
34
38
## Basic example
@@ -40,23 +44,23 @@ name: Dart
40
44
41
45
on :
42
46
push :
43
- branches : [ master ]
47
+ branches : [ main ]
44
48
pull_request :
45
- branches : [ master ]
49
+ branches : [ main ]
46
50
47
51
jobs :
48
52
build :
49
53
runs-on : ubuntu-latest
50
54
51
55
steps :
52
- - uses : actions/checkout@v2
56
+ - uses : actions/checkout@v3
53
57
-
uses :
dart-lang/[email protected]
54
58
55
59
- name : Install dependencies
56
60
run : dart pub get
57
61
58
62
- name : Hello world
59
- run : dart bin/hello_world.dart
63
+ run : dart run bin/hello_world.dart
60
64
` ` `
61
65
62
66
## Check static analysis, formatting, and test example
@@ -111,7 +115,7 @@ jobs:
111
115
os : [ubuntu-latest, macos-latest, windows-latest]
112
116
sdk : [stable, beta, dev, 2.10.3, 2.12.0-29.10.beta]
113
117
steps :
114
- - uses : actions/checkout@v2
118
+ - uses : actions/checkout@v3
115
119
-
uses :
dart-lang/[email protected]
116
120
with :
117
121
sdk : ${{ matrix.sdk }}
@@ -125,7 +129,7 @@ jobs:
125
129
126
130
## Testing older Dart SDKs example
127
131
128
- The Dart SDK continously evolves, and new features and tools are added. The Dart
132
+ The Dart SDK continuously evolves, and new features and tools are added. The Dart
129
133
2.10 SDK introduced a new unified ` dart` developer tool, which is what we use in
130
134
the usage examples above for installing dependencies, verifying formatting,
131
135
analyzing, etc. If you need to test a combination of SDKs before and after Dart
@@ -140,7 +144,7 @@ jobs:
140
144
os: [ubuntu-latest, macos-latest, windows-latest]
141
145
sdk: [stable, beta, dev]
142
146
steps:
143
- - uses: actions/checkout@v2
147
+ - uses: actions/checkout@v3
144
148
- uses: dart-lang/[email protected]
145
149
with:
146
150
sdk: ${{ matrix.sdk }}
@@ -160,7 +164,7 @@ jobs:
160
164
os: [ubuntu-latest, macos-latest, windows-latest]
161
165
sdk: [2.9.0, 2.8.1]
162
166
steps:
163
- - uses: actions/checkout@v2
167
+ - uses: actions/checkout@v3
164
168
- uses: dart-lang/[email protected]
165
169
with:
166
170
sdk: ${{ matrix.sdk }}
@@ -181,8 +185,8 @@ jobs:
181
185
in an environment variable, `DART_HOME`
182
186
([#43](https://github.com/dart-lang/setup-dart/issues/43))
183
187
184
- * Fixed a issue where cached downloads could lead to unzip issues
185
- on self hosted runners
188
+ * Fixed an issue where cached downloads could lead to unzip issues
189
+ on self- hosted runners
186
190
([#35](https://github.com/dart-lang/setup-dart/issues/35))
187
191
188
192
# # v1.2
0 commit comments