Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e1529bc12 | ||
|
|
99cf4656b5 | ||
|
|
b3c14e7ecc | ||
|
|
05b7251cb1 | ||
|
|
2d3283596d | ||
|
|
b5a1c34304 | ||
|
|
77740fc108 | ||
|
|
36e70a6528 |
11
.github/workflows/workflow.yml
vendored
11
.github/workflows/workflow.yml
vendored
@@ -1,12 +1,19 @@
|
||||
name: Main workflow
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test_channel:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
channel: [stable, beta, dev]
|
||||
channel: [stable, beta]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
12
README.md
12
README.md
@@ -23,7 +23,7 @@ steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable' # or: 'beta', 'dev' or 'master'
|
||||
channel: 'stable' # or: 'beta' or 'master'
|
||||
- run: flutter --version
|
||||
```
|
||||
|
||||
@@ -108,7 +108,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: beta
|
||||
channel: 'beta'
|
||||
- run: flutter config --enable-windows-desktop
|
||||
- run: flutter build windows
|
||||
```
|
||||
@@ -123,7 +123,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: beta
|
||||
channel: 'beta'
|
||||
- run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y ninja-build libgtk-3-dev
|
||||
@@ -141,7 +141,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: beta
|
||||
channel: 'beta'
|
||||
- run: flutter config --enable-macos-desktop
|
||||
- run: flutter build macos
|
||||
```
|
||||
@@ -153,8 +153,8 @@ steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: 2.5.0
|
||||
channel: stable
|
||||
flutter-version: '2.5.0'
|
||||
channel: 'stable'
|
||||
cache: true
|
||||
cache-key: flutter # optional, change this to force refresh cache
|
||||
cache-path: ${{ runner.tool_cache }}/flutter # optional, change this to specify the cache path
|
||||
|
||||
18
setup.sh
18
setup.sh
@@ -48,15 +48,21 @@ get_version_manifest() {
|
||||
download_archive() {
|
||||
archive_url="$MANIFEST_BASE_URL/$1"
|
||||
archive_name=$(basename $1)
|
||||
archive_local="$HOME/$archive_name"
|
||||
archive_local="$RUNNER_TEMP/$archive_name"
|
||||
|
||||
curl --connect-timeout 15 --retry 5 $archive_url >$archive_local
|
||||
|
||||
# Create the target folder
|
||||
mkdir -p "$2"
|
||||
|
||||
if [[ $archive_name == *zip ]]; then
|
||||
unzip -q -o "$archive_local" -d "$HOME"
|
||||
shopt -s dotglob
|
||||
mv ${HOME}/flutter/* "$2"
|
||||
shopt -u dotglob
|
||||
unzip -q -o "$archive_local" -d "$RUNNER_TEMP"
|
||||
# Remove the folder again so that the move command can do a simple rename
|
||||
# instead of moving the content into the target folder.
|
||||
# This is a little bit of a hack since the "mv --no-target-directory"
|
||||
# linux option is not available here
|
||||
rm -r "$2"
|
||||
mv ${RUNNER_TEMP}/flutter "$2"
|
||||
else
|
||||
tar xf "$archive_local" -C "$2" --strip-components=1
|
||||
fi
|
||||
@@ -90,8 +96,6 @@ else
|
||||
PUB_CACHE="${HOME}/.pub-cache"
|
||||
fi
|
||||
|
||||
mkdir -p "$SDK_CACHE"
|
||||
|
||||
if [[ ! -x "${SDK_CACHE}/bin/flutter" ]]; then
|
||||
if [[ $CHANNEL == master ]]; then
|
||||
git clone -b master https://github.com/flutter/flutter.git "$SDK_CACHE"
|
||||
|
||||
Reference in New Issue
Block a user