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
|
name: Main workflow
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_channel:
|
test_channel:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
channel: [stable, beta, dev]
|
channel: [stable, beta]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -23,7 +23,7 @@ steps:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: 'stable' # or: 'beta', 'dev' or 'master'
|
channel: 'stable' # or: 'beta' or 'master'
|
||||||
- run: flutter --version
|
- run: flutter --version
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: beta
|
channel: 'beta'
|
||||||
- run: flutter config --enable-windows-desktop
|
- run: flutter config --enable-windows-desktop
|
||||||
- run: flutter build windows
|
- run: flutter build windows
|
||||||
```
|
```
|
||||||
@@ -123,7 +123,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: beta
|
channel: 'beta'
|
||||||
- run: |
|
- run: |
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y ninja-build libgtk-3-dev
|
sudo apt-get install -y ninja-build libgtk-3-dev
|
||||||
@@ -141,7 +141,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: beta
|
channel: 'beta'
|
||||||
- run: flutter config --enable-macos-desktop
|
- run: flutter config --enable-macos-desktop
|
||||||
- run: flutter build macos
|
- run: flutter build macos
|
||||||
```
|
```
|
||||||
@@ -153,8 +153,8 @@ steps:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: 2.5.0
|
flutter-version: '2.5.0'
|
||||||
channel: stable
|
channel: 'stable'
|
||||||
cache: true
|
cache: true
|
||||||
cache-key: flutter # optional, change this to force refresh cache
|
cache-key: flutter # optional, change this to force refresh cache
|
||||||
cache-path: ${{ runner.tool_cache }}/flutter # optional, change this to specify the cache path
|
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() {
|
download_archive() {
|
||||||
archive_url="$MANIFEST_BASE_URL/$1"
|
archive_url="$MANIFEST_BASE_URL/$1"
|
||||||
archive_name=$(basename $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
|
curl --connect-timeout 15 --retry 5 $archive_url >$archive_local
|
||||||
|
|
||||||
|
# Create the target folder
|
||||||
|
mkdir -p "$2"
|
||||||
|
|
||||||
if [[ $archive_name == *zip ]]; then
|
if [[ $archive_name == *zip ]]; then
|
||||||
unzip -q -o "$archive_local" -d "$HOME"
|
unzip -q -o "$archive_local" -d "$RUNNER_TEMP"
|
||||||
shopt -s dotglob
|
# Remove the folder again so that the move command can do a simple rename
|
||||||
mv ${HOME}/flutter/* "$2"
|
# instead of moving the content into the target folder.
|
||||||
shopt -u dotglob
|
# 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
|
else
|
||||||
tar xf "$archive_local" -C "$2" --strip-components=1
|
tar xf "$archive_local" -C "$2" --strip-components=1
|
||||||
fi
|
fi
|
||||||
@@ -90,8 +96,6 @@ else
|
|||||||
PUB_CACHE="${HOME}/.pub-cache"
|
PUB_CACHE="${HOME}/.pub-cache"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "$SDK_CACHE"
|
|
||||||
|
|
||||||
if [[ ! -x "${SDK_CACHE}/bin/flutter" ]]; then
|
if [[ ! -x "${SDK_CACHE}/bin/flutter" ]]; then
|
||||||
if [[ $CHANNEL == master ]]; then
|
if [[ $CHANNEL == master ]]; then
|
||||||
git clone -b master https://github.com/flutter/flutter.git "$SDK_CACHE"
|
git clone -b master https://github.com/flutter/flutter.git "$SDK_CACHE"
|
||||||
|
|||||||
Reference in New Issue
Block a user