{"id":16939887,"url":"https://github.com/sushichop/gha-swift-env","last_synced_at":"2025-07-13T20:07:17.394Z","repository":{"id":43482555,"uuid":"458472666","full_name":"sushichop/gha-swift-env","owner":"sushichop","description":"A GitHub Action that sets up a Swift environment for cross-platform","archived":false,"fork":false,"pushed_at":"2025-01-28T22:52:38.000Z","size":44,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-28T20:05:10.651Z","etag":null,"topics":["actions","cmake","cross-platform","env","github-actions","ninja","swift"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sushichop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-12T09:11:26.000Z","updated_at":"2025-03-01T07:13:29.000Z","dependencies_parsed_at":"2025-03-21T06:10:36.043Z","dependency_job_id":"040f2421-8e46-4bd0-8982-9f22e0d746fb","html_url":"https://github.com/sushichop/gha-swift-env","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/sushichop/gha-swift-env","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sushichop%2Fgha-swift-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sushichop%2Fgha-swift-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sushichop%2Fgha-swift-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sushichop%2Fgha-swift-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sushichop","download_url":"https://codeload.github.com/sushichop/gha-swift-env/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sushichop%2Fgha-swift-env/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265198361,"owners_count":23726449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","cmake","cross-platform","env","github-actions","ninja","swift"],"created_at":"2024-10-13T21:05:45.203Z","updated_at":"2025-07-13T20:07:17.180Z","avatar_url":"https://github.com/sushichop.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gha-swift-env\n\n[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-v1-undefined.svg?logo=github\u0026logoColor=white)](https://github.com/marketplace/actions/swift-env)\n[![release](https://img.shields.io/github/v/release/sushichop/gha-swift-env.svg?color=blue)](https://github.com/sushichop/gha-swift-env/releases)\n![CI](https://github.com/sushichop/gha-swift-env/workflows/CI/badge.svg)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/sushichop/gha-swift-env/blob/main/LICENSE)\n\n`gha-swift-env` is a GitHub Action that sets up Swift environment for **cross-platform(macOS, Ubuntu Linux, and Windows)**. \n\n## Usage\n\nYou can set the release version of Swift.\n\n```yaml\n- uses: sushichop/gha-swift-env@v1\n  with:\n    swift-version: '6.0.3'\n- name: Show Swift version and build Swift package\n  run: |\n    swift --version\n    swift build -v -c release\n```\n\nYou can also set the snapshot version of Swift.\n\n```yaml\n- uses: sushichop/gha-swift-env@v1\n  with:\n    swift-version: '2025-01-10-a'\n- name: Show Swift version and build Swift package\n  run: |\n    swift --version\n    swift build -v -c release\n```\n\n## Example\n\nYou can build and test Swift package for cross-platform(macOS, Ubuntu Linux, and Windows).\n\n\n```yaml\non\n  pull_request:\n\njobs:\n  swiftpm:\n    name: SwiftPM - Swift ${{ matrix.swift-version }} on ${{ matrix.os }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        os: ['macos-14', 'ubuntu-22.04', 'windows-2022']\n        swift-version: ['6.0.3', '5.10', '2025-01-10-a']\n      fail-fast: false\n    steps:\n      - uses: actions/checkout@v4\n      - uses: sushichop/gha-swift-env@V1\n        with:\n          swift-version: ${{ matrix.swift-version }}\n      - name: Build and test a Swift package\n        run: |\n          swift build -v -c release\n          swift test -v -Xswiftc -warnings-as-errors\n```\n\n## Inputs\n\n- `swift-version` – (required) Swift version to use\n  - Specify release or snapshot version\n    - `'5.10'`, `'6.0.3'`, `'2025-01-10-a'`, ...\n  - Default\n    - `'6.0.3'`\n\n- `winsdk-version` – (optional) WinSDK to use on Windows\n  - Specify Windows 10 SDK version\n    - `''`, `'10.0.26100.0'`, ... \n  - Default:\n    - `''`\n    - This value(an empty string) sets the default Windows 10 SDK version\n\n## License\n\n`gha-swift-env` is available under the [MIT license](http://www.opensource.org/licenses/mit-license). See the LICENSE file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsushichop%2Fgha-swift-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsushichop%2Fgha-swift-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsushichop%2Fgha-swift-env/lists"}