diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5d31ffe..98c27c4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,18 +20,18 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest] - swift-version: ["latest", "6.1"] + swift-version: ["latest", "6", "6.1"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 - uses: ./ + id: swiftly-swift with: swift-version: ${{ matrix.swift-version }} - - name: test - latest - if: ${{ matrix.swift-version == 'latest' }} + - name: Verify Swift Version shell: bash - run: swift --version | grep -q 'Swift version' - - name: test - version - if: ${{ matrix.swift-version != 'latest' }} - shell: bash - run: swift --version | grep -q 'Swift version ${{ matrix.swift-version }}' + run: | + echo "Input version: ${{ matrix.swift-version }}" + echo "Resolved version: ${{ steps.swiftly-swift.outputs.swift-version }}" + swift --version + swift --version | grep -q 'Swift version ${{ steps.swiftly-swift.outputs.swift-version }}' diff --git a/action.yml b/action.yml index b7fa3a1..9425b9d 100644 --- a/action.yml +++ b/action.yml @@ -16,6 +16,11 @@ inputs: required: true default: latest +outputs: + swift-version: + description: The resolved Swift version that was installed. + value: ${{ steps.resolve-version.outputs.version }} + runs: using: composite steps: