Skip to content

Provide an action that outputs the matrix for requested Swift/Xcodes #23

@mxcl

Description

@mxcl

https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/

So the action might look like:

jobs:
  foo:
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.xcode-matrix.outputs.matrix }}
    steps:
    - uses: mxcl/xcode-matrix
      id: xcode-matrix
      with:
        swift: 5.0 5.1 5.2 5.3 5.4 5.5

And then can be consumed in a subsequent job:

jobs:
  bar:
    needs: foo
    strategy:
      matrix: ${{ jobs.foo.outputs.matrix }}
    runs-on: ${{ matrix.os }}
    steps:
      - uses: mxcl/xcodebuild
        with:
          xcode: ${{ matrix.xcode }}

Note this requires the action to have JSON files on versions that are generated daily via a scheduled workflow since we cannot determine the matrix inside any particular runs-on image. Hence the above uses ubuntu.

Note not sure how to do eg. platform matrix this way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions