diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 97262c5..0e0f8dd 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -44,3 +44,25 @@ jobs: run: | echo "main() { print('hello world'); }" > hello.dart dart hello.dart + + test_pub: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + sdk: [stable, beta] + steps: + - uses: actions/checkout@v2 + - uses: ./ + with: + sdk: ${{ matrix.sdk }} + + - name: Global activate + run + run: | + dart pub global activate stagehand + mkdir testapp + cd testapp + stagehand console-simple + dart pub get + dart run diff --git a/README.md b/README.md index 5fcc4ce..3fc23e8 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,9 @@ jobs: # Version history +## v0.5 + * Fixed a Windows `pub global activate` path issue. + ## v0.4 * Removed previously deprecated input `channel`. Use the `sdk` input instead. diff --git a/setup.sh b/setup.sh index 71a089b..29f12b2 100755 --- a/setup.sh +++ b/setup.sh @@ -59,6 +59,9 @@ if [ $? -ne 0 ]; then fi rm "${HOME}/dartsdk.zip" +# Configure pub to use a fixed location. +echo "PUB_CACHE=${HOME}/.pub-cache" >> $GITHUB_ENV + # Update paths. echo "${HOME}/.pub-cache/bin" >> $GITHUB_PATH echo "${RUNNER_TOOL_CACHE}/dart-sdk/bin" >> $GITHUB_PATH