docs(README): Add new GitHub Action to install section #1
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
| # SPDX-FileCopyrightText: 2026 Dominik Wombacher <[email protected]> | ||
| # | ||
| # SPDX-License-Identifier: CC0-1.0 | ||
| name: "Test params2env GitHub action" | ||
| on: | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: | ||
| jobs: | ||
| test-install: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| arch: [X64, ARM64] | ||
| steps: | ||
| - name: Log runner info | ||
| run: | | ||
| echo "Testing on $RUNNER_OS / $RUNNER_ARCH" | ||
| - name: Get latest release tag | ||
| id: latest | ||
| run: | | ||
| LATEST_TAG=$(GH_PAGER= gh release list --repo wombelix/params2env --limit 1 --json tagName | jq -r '.[0].tagName') | ||
| echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV | ||
| echo "Latest release: $LATEST_TAG" | ||
| - name: Install params2env | ||
| uses: wombelix/params2env@${{ env.LATEST_TAG }} | ||
| - name: Verify installed version | ||
| run: | | ||
| INSTALLED_VERSION=$(params2env --version) | ||
| echo "Installed params2env version: $INSTALLED_VERSION" | ||
| if [[ "$INSTALLED_VERSION" != *"${LATEST_TAG#v}"* ]]; then | ||
| echo "Installed version does not match latest release tag $LATEST_TAG!" | ||
| exit 1 | ||
| fi | ||
| echo "Installed version matches latest release." | ||