fix: add Windows compatibility for sops and yq commands in `mise_…
#39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| main: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| env: | |
| BASH_ENV: /tmp/bash_env | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup mise | |
| uses: jdx/mise-action@v2 | |
| with: | |
| github_token: ${{ github.token }} | |
| - name: Activate mise | |
| run: | | |
| # shellcheck disable=SC2016 | |
| echo 'eval "$(mise activate bash)"' >> "$BASH_ENV" | |
| # shellcheck disable=SC1090 | |
| . "$BASH_ENV" | |
| mise doctor | |
| - name: Run Checks | |
| run: hk check --all | |
| - name: Run Tests | |
| run: if mise task info test; then mise run test; fi | |
| - name: Semantic Release | |
| if: github.event_name == 'push' | |
| uses: cycjimmy/semantic-release-action@v4 | |
| with: | |
| extra_plugins: | | |
| @semantic-release/commit-analyzer | |
| @semantic-release/release-notes-generator | |
| @semantic-release/exec | |
| @semantic-release/git | |
| @semantic-release/github | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| BASH_ENV: /tmp/bash_env | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup mise | |
| uses: jdx/mise-action@v2 | |
| with: | |
| github_token: ${{ github.token }} | |
| - name: Run tests (posix) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| eval "$(mise activate bash)" | |
| echo "::group::mise doctor" | |
| mise doctor | |
| echo "::endgroup::" | |
| mise run test | |
| - name: Run tests (windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $shimPath = "$env:USERPROFILE\AppData\Local\mise\shims" | |
| $currentPath = [Environment]::GetEnvironmentVariable('Path', 'User') | |
| $newPath = $currentPath + ";" + $shimPath | |
| [Environment]::SetEnvironmentVariable('Path', $newPath, 'User') | |
| echo "::group::mise doctor" | |
| mise doctor | |
| echo "::endgroup::" | |
| mise run test |