Skip to content

Commit

Permalink
Merge pull request #6 from Fox32/master
Browse files Browse the repository at this point in the history
Add package_directory parameter
  • Loading branch information
sakebook authored Dec 1, 2019
2 parents 05f67f0 + 56d84c3 commit d4c1744
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ This action publishing the Flutter plugin.

**Optional** Skip test. Default: `false`

### `package_directory`

**Optional** Package directory. Default: `"."`

## Example usage

```yaml
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ inputs:
description: '(Optional) Skip test (default: false)'
required: false
default: false
package_directory:
description: '(Optional) Package directory (default: ".")'
required: false
default: '.'
runs:
using: 'docker'
image: 'Dockerfile'
Expand Down
6 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ check_credentials() {
echo "OK"
}

switch_working_directory() {
echo "Switching to package directory"
cd "$INPUT_PACKAGE_DIRECTORY"
}

copy_credential() {
echo "Copy credentials"
mkdir -p ~/.pub-cache
Expand Down Expand Up @@ -52,5 +57,6 @@ publish_package() {

check_credentials
copy_credential
switch_working_directory
run_test_if_needed
publish_package

0 comments on commit d4c1744

Please sign in to comment.