diff --git a/README.md b/README.md index 21a40bb..7862ee6 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,13 @@ [![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) -This [GitHub Action](https://github.com/dart-lang/setup-dart) installs and sets up of a Dart SDK for use in actions by: +This [GitHub Action](https://github.com/dart-lang/setup-dart) installs +and sets up of a Dart SDK for use in actions by: * Downloading the Dart SDK -* Adding the [`dart`](https://dart.dev/tools/dart-tool) command and `pub` cache to path +* Adding the [`dart`](https://dart.dev/tools/dart-tool) command + and [`pub` cache](https://dart.dev/tools/pub/cmd/pub-get#the-system-package-cache) + to the system path # Usage @@ -16,11 +19,11 @@ The action takes the following inputs: * `sdk`: Which SDK version to setup. Can be specified using one of two forms: * A specific SDK version, e.g. `2.7.2` or `2.12.0-1.4.beta` * A release channel, which will install the latest build from that channel. - Available channels are `stable`, `beta`, `dev`, and `main`. See - https://dart.dev/tools/sdk/archive for details. + Available channels are `stable`, `beta`, `dev`, and `main`. + See the [Dart SDK archive](https://dart.dev/get-dart/archive) for details. * `flavor`: Which build flavor to setup. - * Avaliable build flavors are `raw` and `release`. + * Available build flavors are `raw` and `release`. * `release` flavor contains published builds. * `raw` flavor contains unpublished builds, which can be used by developers to test against SDK versions before a release. @@ -28,7 +31,8 @@ The action takes the following inputs: * `architecture`: The CPU architecture to setup support for. Valid options are `x64`, `ia32`, `arm`, and `arm64`. Note that not all CPU architectures are - supported on all operating systems; see https://dart.dev/tools/sdk/archive + supported on all operating systems; see the + [Dart system requirements](https://dart.dev/get-dart#system-requirements) for valid combinations. ## Basic example @@ -40,23 +44,23 @@ name: Dart on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1.3 - name: Install dependencies run: dart pub get - name: Hello world - run: dart bin/hello_world.dart + run: dart run bin/hello_world.dart ``` ## Check static analysis, formatting, and test example @@ -111,7 +115,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] sdk: [stable, beta, dev, 2.10.3, 2.12.0-29.10.beta] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1.3 with: sdk: ${{ matrix.sdk }} @@ -125,7 +129,7 @@ jobs: ## Testing older Dart SDKs example -The Dart SDK continously evolves, and new features and tools are added. The Dart +The Dart SDK continuously evolves, and new features and tools are added. The Dart 2.10 SDK introduced a new unified `dart` developer tool, which is what we use in the usage examples above for installing dependencies, verifying formatting, analyzing, etc. If you need to test a combination of SDKs before and after Dart @@ -140,7 +144,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] sdk: [stable, beta, dev] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1.3 with: sdk: ${{ matrix.sdk }} @@ -160,7 +164,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] sdk: [2.9.0, 2.8.1] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1.3 with: sdk: ${{ matrix.sdk }} @@ -181,8 +185,8 @@ jobs: in an environment variable, `DART_HOME` ([#43](https://github.com/dart-lang/setup-dart/issues/43)) - * Fixed a issue where cached downloads could lead to unzip issues - on self hosted runners + * Fixed an issue where cached downloads could lead to unzip issues + on self-hosted runners ([#35](https://github.com/dart-lang/setup-dart/issues/35)) ## v1.2