Skip to content

Commit 745c09d

Browse files
authored
Update and cleanup README (#63)
* Update checkout action version
1 parent 196f545 commit 745c09d

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

README.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
[![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)
44

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:
67

78
* 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
912

1013
# Usage
1114

@@ -16,19 +19,20 @@ The action takes the following inputs:
1619
* `sdk`: Which SDK version to setup. Can be specified using one of two forms:
1720
* A specific SDK version, e.g. `2.7.2` or `2.12.0-1.4.beta`
1821
* 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.
2124

2225
* `flavor`: Which build flavor to setup.
23-
* Avaliable build flavors are `raw` and `release`.
26+
* Available build flavors are `raw` and `release`.
2427
* `release` flavor contains published builds.
2528
* `raw` flavor contains unpublished builds, which can be used by developers
2629
to test against SDK versions before a release.
2730
* `main` release channel only supports `raw` build flavor.
2831

2932
* `architecture`: The CPU architecture to setup support for. Valid options are
3033
`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)
3236
for valid combinations.
3337

3438
## Basic example
@@ -40,23 +44,23 @@ name: Dart
4044

4145
on:
4246
push:
43-
branches: [ master ]
47+
branches: [ main ]
4448
pull_request:
45-
branches: [ master ]
49+
branches: [ main ]
4650

4751
jobs:
4852
build:
4953
runs-on: ubuntu-latest
5054

5155
steps:
52-
- uses: actions/checkout@v2
56+
- uses: actions/checkout@v3
5357
- uses: dart-lang/[email protected]
5458

5559
- name: Install dependencies
5660
run: dart pub get
5761

5862
- name: Hello world
59-
run: dart bin/hello_world.dart
63+
run: dart run bin/hello_world.dart
6064
```
6165
6266
## Check static analysis, formatting, and test example
@@ -111,7 +115,7 @@ jobs:
111115
os: [ubuntu-latest, macos-latest, windows-latest]
112116
sdk: [stable, beta, dev, 2.10.3, 2.12.0-29.10.beta]
113117
steps:
114-
- uses: actions/checkout@v2
118+
- uses: actions/checkout@v3
115119
- uses: dart-lang/[email protected]
116120
with:
117121
sdk: ${{ matrix.sdk }}
@@ -125,7 +129,7 @@ jobs:
125129
126130
## Testing older Dart SDKs example
127131
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
129133
2.10 SDK introduced a new unified `dart` developer tool, which is what we use in
130134
the usage examples above for installing dependencies, verifying formatting,
131135
analyzing, etc. If you need to test a combination of SDKs before and after Dart
@@ -140,7 +144,7 @@ jobs:
140144
os: [ubuntu-latest, macos-latest, windows-latest]
141145
sdk: [stable, beta, dev]
142146
steps:
143-
- uses: actions/checkout@v2
147+
- uses: actions/checkout@v3
144148
- uses: dart-lang/[email protected]
145149
with:
146150
sdk: ${{ matrix.sdk }}
@@ -160,7 +164,7 @@ jobs:
160164
os: [ubuntu-latest, macos-latest, windows-latest]
161165
sdk: [2.9.0, 2.8.1]
162166
steps:
163-
- uses: actions/checkout@v2
167+
- uses: actions/checkout@v3
164168
- uses: dart-lang/[email protected]
165169
with:
166170
sdk: ${{ matrix.sdk }}
@@ -181,8 +185,8 @@ jobs:
181185
in an environment variable, `DART_HOME`
182186
([#43](https://github.com/dart-lang/setup-dart/issues/43))
183187

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
186190
([#35](https://github.com/dart-lang/setup-dart/issues/35))
187191

188192
## v1.2

0 commit comments

Comments
 (0)