From a7b973c88d4901e8852e58e2d19d1a86097c6696 Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Tue, 14 Jun 2022 13:34:33 +0900 Subject: [PATCH 1/2] fix: windows support --- .github/workflows/test-actions.yml | 21 ++++++++++++++++++--- action.yaml | 5 +++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-actions.yml b/.github/workflows/test-actions.yml index e446466..96a2e64 100644 --- a/.github/workflows/test-actions.yml +++ b/.github/workflows/test-actions.yml @@ -8,7 +8,12 @@ on: branches: [main] jobs: default: - runs-on: ubuntu-latest + strategy: + matrix: + env: + - runs-on: windows-latest + - runs-on: ubuntu-latest + runs-on: ${{ matrix.env.runs-on }} steps: - uses: actions/checkout@v3 - uses: ./ @@ -20,7 +25,12 @@ jobs: - run: github-comment -v working-directory: tests set-absolute-path: - runs-on: ubuntu-latest + strategy: + matrix: + env: + - runs-on: windows-latest + - runs-on: ubuntu-latest + runs-on: ${{ matrix.env.runs-on }} steps: - uses: actions/checkout@v3 - uses: ./ @@ -30,7 +40,12 @@ jobs: working_directory: tests - run: /tmp/bin/aqua -v set-relative-path: - runs-on: ubuntu-latest + strategy: + matrix: + env: + - runs-on: windows-latest + - runs-on: ubuntu-latest + runs-on: ${{ matrix.env.runs-on }} steps: - uses: actions/checkout@v3 - uses: ./ diff --git a/action.yaml b/action.yaml index f5c0c0c..be57eee 100644 --- a/action.yaml +++ b/action.yaml @@ -29,6 +29,11 @@ runs: shell: bash working-directory: ${{ inputs.working_directory }} if: inputs.enable_aqua_install == 'true' + - run: | + echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + shell: pwsh + if: runner.os == 'Windows' && inputs.enable_aqua_install == 'true' + working-directory: ${{ inputs.working_directory }} - run: bash "${{github.action_path}}/action.sh" working-directory: ${{ inputs.working_directory }} From 56610e3677ae56b8c8dad853be9d3180c5fd9bc8 Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Tue, 14 Jun 2022 13:38:41 +0900 Subject: [PATCH 2/2] fix: fix lint errors --- .github/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 195e378..f713af8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,27 +11,27 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: cat aqua-installer | bash - - run: echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" >> $GITHUB_PATH + - run: bash < aqua-installer + - run: echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" >> "$GITHUB_PATH" - run: command -v aqua - run: aqua -v set-version: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: cat aqua-installer | bash -s -- -v v0.1.0-9 - - run: echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" >> $GITHUB_PATH + - run: bash -s -- -v v0.1.0-9 < aqua-installer + - run: echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" >> "$GITHUB_PATH" - run: command -v aqua - run: aqua -v set-absolute-path: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: cat aqua-installer | bash -s -- -i /tmp/bin/aqua + - run: bash -s -- -i /tmp/bin/aqua < aqua-installer - run: /tmp/bin/aqua -v set-relative-path: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: cat aqua-installer | bash -s -- -i bin/aqua + - run: bash -s -- -i bin/aqua < aqua-installer - run: bin/aqua -v