Compare commits

...

8 Commits

Author SHA1 Message Date
Alif Rachmawadi
5e1529bc12 update readme 2022-02-07 23:42:26 +00:00
Alif Rachmawadi
99cf4656b5 Merge pull request #134 from kuhnroyal/temp-folder-windows
Fix temp folder handling on windows
2022-02-04 23:44:20 +07:00
Peter Leibiger
b3c14e7ecc Fix temp folder handling on windows
Something with the globing seems not work but not sure exactly. Now using a simple way of ensure that the target folder never exists when calling `mv` so that it behaves as a rename instead of a move into. The folder still needs to be created first so that parent folders (in case of a custom cache path) are created.
2022-02-04 17:30:43 +01:00
Alif Rachmawadi
05b7251cb1 Merge pull request #133 from davidmigloz/main
Remove dev channel mentions
2022-02-04 18:19:49 +07:00
David Miguel Lozano
2d3283596d Remove dev channel 2022-02-04 12:04:07 +01:00
Alif Rachmawadi
b5a1c34304 run workflow on pull request 2022-02-04 10:30:09 +00:00
Alif Rachmawadi
77740fc108 Merge pull request #132 from kuhnroyal/temp-folder
Download and unzip to temp folder and not $HOME
2022-02-04 17:24:54 +07:00
Peter Leibiger
36e70a6528 Download and unzip to temp folder and not $HOME 2022-02-03 23:50:13 +01:00
3 changed files with 26 additions and 15 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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"