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

refactor the readme #72

Merged
merged 1 commit into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
47 changes: 46 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
Please see the [version history](https://github.com/dart-lang/setup-dart/blob/main/README.md#version-history) in the README.md file.
## v1.4.0

* Automatically create OIDC token for pub.dev.
* Add a reusable workflow for publishing.

## v1.3.0

* The install location of the Dart SDK is now available
in an environment variable, `DART_HOME`
([#43](https://github.com/dart-lang/setup-dart/issues/43)).
* 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.0

* Fixed a path issue impacting git dependencies on Windows.

## v1.1.0

* Added a `flavor` option setup.sh to allow downloading unpublished builds.

## v1.0.0

* Promoted to 1.0 stable.

## v0.5

* Fixed a Windows `pub global activate` path issue.

## v0.4

* Removed previously deprecated input `channel`. Use the `sdk` input instead.
* Added support for specifying the CPU architecture.

## v0.3

* Added support for installing SDKs from the `main` channel.

## v0.2

* Added support for installing a specific SDK version (e.g. `2.10.0`).

## v0.1

* Initial version.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to Contribute
## How to Contribute

Prior to sending patches and contributions to this project, please file
an issue in the issue tracker to ensure there is alignment with the overall
Expand Down
118 changes: 30 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ and sets up of a Dart SDK for use in actions by:
and [`pub` cache](https://dart.dev/tools/pub/cmd/pub-get#the-system-package-cache)
to the system path

# Usage
## Usage

Install the latest stable SDK and run 'Hello World':

```yml
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- run: dart pub get
- run: dart run bin/hello_world.dart
```

## Inputs

Expand All @@ -23,47 +33,20 @@ The action takes the following inputs:
See the [Dart SDK archive](https://dart.dev/get-dart/archive) for details.

* `flavor`: Which build flavor to setup.
* 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 the
[Dart system requirements](https://dart.dev/get-dart#system-requirements)
for valid combinations.

## Basic example
* The available build flavors are `release` and `raw`.
* The `release` flavor contains published builds.
* The `raw` flavor contains unpublished builds; these can be used by
developers to test against SDK versions before a release. Note that the
`main` release channel only supports `raw` build flavor.

Install the latest stable SDK, and run Hello World.
* `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 the
[Dart system requirements](https://dart.dev/get-dart#system-requirements)
for valid combinations.

```yml
name: Dart

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1

- name: Install dependencies
run: dart pub get

- name: Hello world
run: dart run bin/hello_world.dart
```

## Check static analysis, formatting, and test example
## Check static analysis, formatting, and run tests

Various static checks:

Expand Down Expand Up @@ -127,7 +110,7 @@ jobs:
run: dart test
```

## Testing older Dart SDKs example
## Testing older Dart SDKs

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
Expand Down Expand Up @@ -178,55 +161,14 @@ jobs:
run: pub run test
```

# Version history

## v1.4

* Automatically create OIDC token for pub.dev.
* Add a reusable workflow for publishing.

## v1.3

* The install location of the Dart SDK is now available
in an environment variable, `DART_HOME`
([#43](https://github.com/dart-lang/setup-dart/issues/43)).
* 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

* Fixed a path issue impacting git dependencies on Windows.

## v1.1

* Added a `flavor` option setup.sh to allow downloading unpublished builds.

## v1.0

* Promoted to 1.0 stable.

## v0.5

* Fixed a Windows `pub global activate` path issue.

## v0.4

* Removed previously deprecated input `channel`. Use the `sdk` input instead.
* Added support for specifying the CPU architecture.

## v0.3

* Added support for installing SDKs from the `main` channel.

## v0.2
## License

* Added support for installing a specific SDK version (e.g. `2.10.0`).
See the [LICENSE](LICENSE) file.

## v0.1
## Contributing

* Initial version.
Contributions are welcome! Please see [CONTRIBUTING.md.md](CONTRIBUTING.md.md).

# License
## Version history

See the [`LICENSE`](LICENSE) file.
Please see out [CHANGELOG.md](CHANGELOG.md) file.