github / github/docs

Swift CI tutorial examples are outdated (Swift 5.2/5.3, setup-swift pinned to a 2021 commit)

未關閉 適合新手
#44,868 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
content github_actions Inactive
主要語言
TypeScript
星號
20.8k
分支
68.7k
平均合併
13 小時 10 分鐘
30 天內合併 PR
111

描述

### Code of Conduct

- [x] I have read and agree to the GitHub Docs project's [Code of Conduct](https://github.com/github/docs/blob/main/.github/CODE_OF_CONDUCT.md)

### What article on docs.github.com is affected?

[Building and testing Swift](https://docs.github.com/en/actions/tutorials/build-and-test-code/swift)

Source file: `content/actions/tutorials/build-and-test-code/swift.md`

### What part(s) of the article would you like to see updated?

The tutorial's examples have aged and no longer reflect current Swift CI practice:

- **Swift versions are several years old.** The matrix example uses `swift: ["5.2", "5.3"]` and the single-version examples use `"5.3.3"`. Swift is now on the 6.x series (current release 6.3).
- **`swift-actions/setup-swift` is pinned to a 2021 commit** (`65540b95f51493d65f5e59e97dcef9629ddf11bf`). The action's current release is v2.4.0 (November 2025). This is the same kind of staleness previously reported in #12678.

#### Proposed changes (the uncontroversial refresh)

1. Update the example Swift versions to current releases.
2. Refresh the `swift-actions/setup-swift` SHA pin to its current release, keeping the not-certified-by-GitHub notice and SHA-pinning reusables already used on the page.
3. Optionally add a short section showing how to build and test on Linux using the official `swift` container images (and the `swiftlang/swift` nightly images), which doesn't require a separate Swift-setup step.

#### A question before I open a PR

Swift CI today commonly spans more than Ubuntu/macOS `swift build` — Apple platforms via Xcode, plus Windows, Android, and WebAssembly. Would the team be open to a brief cross-platform section that demonstrates these, including links to community actions (for example `compnerd/gha-setup-swift` for Windows and `skiptools/swift-android-action` for Android)?

I'd like to confirm this fits the docs' guidance on mentioning third-party tools before investing in a larger PR. For transparency: one action I might reference, `brightdigit/swift-build`, is one I maintain, so I'd want any mention to be neutral and in line with how the page already references `swift-actions/setup-swift`.

Happy to scope the PR to just items 1–2 (or 1–3) if that's preferable.

### Additional information

_No response_

貢獻指南

開啟貢獻指南

研究方向

從 content/actions/tutorials/build-and-test-code/swift.md 開始,檢視現有的 Swift 版本矩陣、單一版本範例,以及 setup-swift 的 SHA pin。在變更選用的跨平台資料之前,確認預期範圍;完成條件是範例使用目前的 Swift 版本、action pin 已更新,且現有通知與可重複使用的指南維持不變。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
github-actions, swift
領域
ci-cd, documentation
Issue 類型
文件
難度
2/5
預估耗時
1-3 小時
活躍度
冷清
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。