name: Copilot Setup Steps on: workflow_dispatch: push: paths: - .github/workflows/copilot-setup-steps.yml jobs: # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. copilot-setup-steps: name: Perform runs-on: ubuntu-24.04 # Swift containers don't work with Copilot # container: swift:6.1-noble permissions: contents: read steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: Get Swift version id: swift_version run: echo "version=$(swift --version | grep '[5-9]\.[0-9]\+\(\.[0-9]\)\?' -o | head -1)" >> "$GITHUB_OUTPUT" - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: key: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} restore-keys: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}- path: .build - name: Build everything run: swift build --build-tests