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

support sdk version wildcard format #106

Merged
merged 8 commits into from Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
20 changes: 19 additions & 1 deletion .github/workflows/dart.yml
Expand Up @@ -82,7 +82,25 @@ jobs:
- uses: ./
with:
sdk: ${{ matrix.sdk }}
architecture: ia32

- name: Run hello world
run: |
echo "main() { print('hello world'); }" > hello.dart
dart hello.dart
- run: dart --version

# Test using wildcard versions for the sdk parameter.
test_release_wildcards:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: test_latest_patch_release (and # Test getting the latest patch release for a major.minor sdk parameter.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

(btw, you can make in-line suggested edits to PRs using the 'add a suggestion' action)

runs-on: ubuntu-latest
strategy:
matrix:
sdk: [2.19, 3.1]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: ./
with:
sdk: ${{ matrix.sdk }}

- name: Run hello world
run: |
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
## v1.6.0

* Add support for specifying a wildcard format for provisioning the latest patch
devoncarew marked this conversation as resolved.
Show resolved Hide resolved
release of an SDK.

## v1.5.1

* No longer test the `setup-dart` action on pre-2.12 SDKs.
Expand Down
12 changes: 7 additions & 5 deletions README.md
Expand Up @@ -36,11 +36,13 @@ jobs:

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.19.0` or `2.12.0-1.4.beta`
* `sdk`: Which SDK version to setup. Can be specified using one of three forms:
* A release channel, which will install the latest build from that channel.
Available channels are `stable`, `beta`, `dev`, and `main`.
See the [Dart SDK archive](https://dart.dev/get-dart/archive) for details.
Available channels are `stable`, `beta`, `dev`, and `main`. See the
[Dart SDK archive](https://dart.dev/get-dart/archive) for details.
* An SDK release version - e.g. `2.19` or `3.1`. This will install the
latest patch release for that specific release version.
* A specific SDK version, e.g. `2.19.0` or `2.12.0-1.4.beta`.

* `flavor`: Which build flavor to setup.
* The available build flavors are `release` and `raw`.
Expand Down Expand Up @@ -89,7 +91,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
sdk: [2.18.0, stable, beta, dev]
sdk: [3.1.x, stable, beta, dev]
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
Expand Down
7 changes: 3 additions & 4 deletions action.yml
Expand Up @@ -6,10 +6,9 @@ branding:
inputs:
sdk:
description: >-
The channel, or a specific version from a channel to install ('stable',
'beta', 'dev', '2.7.2', '2.12.0-1.4.beta'). Using one of the named
channels instead of a version will give you the latest version published
to that channel.
This can be either the channel to install (i.e., 'stable', 'beta', 'dev'),
an SDK release version (i.e., `2.19`, `3.1`), or a specific SDK version
(i.e, '2.19.1', '3.0.0-1.4.beta').
required: false
default: "stable"
architecture:
Expand Down