Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and cleanup README #63

Merged
merged 2 commits into from
Dec 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -16,19 +19,20 @@ 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.
* `main` release channel only supports `raw` build flavor.

* `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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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
Expand Down