Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2783a3f08e | ||
|
|
c33c37022b |
@@ -43,6 +43,8 @@ outputs:
|
|||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
|
- run: chmod +x $GITHUB_ACTION_PATH/setup.sh
|
||||||
|
shell: bash
|
||||||
- id: flutter-action
|
- id: flutter-action
|
||||||
run: $GITHUB_ACTION_PATH/setup.sh -p -c '${{ inputs.cache-path }}' -k '${{ inputs.cache-key }}' -n '${{ inputs.flutter-version }}' -a '${{ inputs.architecture }}' ${{ inputs.channel }}
|
run: $GITHUB_ACTION_PATH/setup.sh -p -c '${{ inputs.cache-path }}' -k '${{ inputs.cache-key }}' -n '${{ inputs.flutter-version }}' -a '${{ inputs.architecture }}' ${{ inputs.channel }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
8
setup.sh
8
setup.sh
@@ -48,13 +48,15 @@ download_archive() {
|
|||||||
mkdir -p "$2"
|
mkdir -p "$2"
|
||||||
|
|
||||||
if [[ "$archive_name" == *zip ]]; then
|
if [[ "$archive_name" == *zip ]]; then
|
||||||
unzip -q -o "$archive_local" -d "$RUNNER_TEMP"
|
EXTRACT_PATH="$RUNNER_TEMP/_unzip_temp"
|
||||||
# Remove the folder again so that the move command can do a simple rename
|
unzip -q -o "$archive_local" -d "$EXTRACT_PATH"
|
||||||
|
# Remove the folder again so that the move command can do a simple rename\
|
||||||
# instead of moving the content into the target folder.
|
# instead of moving the content into the target folder.
|
||||||
# This is a little bit of a hack since the "mv --no-target-directory"
|
# This is a little bit of a hack since the "mv --no-target-directory"
|
||||||
# linux option is not available here
|
# linux option is not available here
|
||||||
rm -r "$2"
|
rm -r "$2"
|
||||||
mv "$RUNNER_TEMP"/flutter "$2"
|
mv "$EXTRACT_PATH"/flutter "$2"
|
||||||
|
rm -r "$EXTRACT_PATH"
|
||||||
else
|
else
|
||||||
tar xf "$archive_local" -C "$2" --strip-components=1
|
tar xf "$archive_local" -C "$2" --strip-components=1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user