diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d2b0bb2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + name: 'test ${{ matrix.os }}' + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup dctl CLI + uses: ./ + + - name: Test dctl + run: dctl --version diff --git a/README.md b/README.md index 7431028..6eb45fb 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ steps: uses: actions/checkout@v3 - name: Setup dctl CLI - uses: doseiai/setup-dctl@v0.0.18 + uses: doseiai/setup-dctl@v0.0.19 with: token: ${{ secrets.DOSEI_TOKEN }} ``` diff --git a/action.yaml b/action.yaml index c1b7909..9003ce5 100644 --- a/action.yaml +++ b/action.yaml @@ -14,8 +14,20 @@ inputs: runs: using: "composite" steps: - - run: curl -fsSL https://dosei.ai/install.sh | sh + - run: | + curl -fsSL https://dosei.ai/install.sh | sh + if [ "$RUNNER_OS" == "Linux" ]; then + echo "/home/runner/.dosei/bin" >> $GITHUB_PATH + elif [ "$RUNNER_OS" == "macOS" ]; then + echo "/Users/runner/.dosei/bin" >> $GITHUB_PATH + fi shell: bash + if: runner.os != 'Windows' + - run: | + irm https://dosei.ai/install.ps1 | iex + Add-Content $env:GITHUB_PATH "$env:USERPROFILE\.dosei\bin" + shell: pwsh + if: runner.os == 'Windows' - run: echo "DOSEI_TOKEN=${{ inputs.token }}" >> $GITHUB_ENV if: ${{ inputs.token }} shell: bash