mirror of
https://github.com/subosito/flutter-action.git
synced 2024-08-16 10:19:50 +02:00
add any channel
This commit is contained in:
parent
c64fa18722
commit
37e2edb15e
2 changed files with 21 additions and 2 deletions
17
.github/workflows/workflow.yml
vendored
17
.github/workflows/workflow.yml
vendored
|
@ -43,7 +43,7 @@ jobs:
|
|||
- name: Run flutter --version
|
||||
shell: bash
|
||||
run: flutter --version
|
||||
test_master:
|
||||
test_master_channel:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -57,3 +57,18 @@ jobs:
|
|||
- name: Run flutter --version
|
||||
shell: bash
|
||||
run: flutter --version
|
||||
test_any_channel:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
with:
|
||||
channel: any
|
||||
flutter-version: 2
|
||||
- name: Run dart --version
|
||||
shell: bash
|
||||
run: dart --version
|
||||
- name: Run flutter --version
|
||||
shell: bash
|
||||
run: flutter --version
|
||||
|
|
6
setup.sh
6
setup.sh
|
@ -18,7 +18,11 @@ latest_version() {
|
|||
}
|
||||
|
||||
wildcard_version() {
|
||||
jq --arg channel "$1" --arg version "^$2" '.releases | map(select(.channel==$channel) | select(.version | test($version))) | first'
|
||||
if [[ $1 == any ]]; then
|
||||
jq --arg version "^$2" '.releases | map(select(.version | test($version))) | first'
|
||||
else
|
||||
jq --arg channel "$1" --arg version "^$2" '.releases | map(select(.channel==$channel) | select(.version | test($version))) | first'
|
||||
fi
|
||||
}
|
||||
|
||||
get_version() {
|
||||
|
|
Loading…
Reference in a new issue