From 15f4ee7eab75219b541b60cc0b94a74e0248a70f Mon Sep 17 00:00:00 2001 From: Bartosz Polaczyk Date: Sat, 7 May 2022 11:52:43 +0200 Subject: [PATCH 1/2] Generate gh-pages docs using docc --- .github/workflows/docs.yaml | 24 ++++++++++++++++++++++++ Package.resolved | 9 +++++++++ Package.swift | 1 + README.md | 1 + docs/Development.md | 2 ++ 5 files changed, 37 insertions(+) create mode 100644 .github/workflows/docs.yaml diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..b6855f4 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,24 @@ +name: Docs + +on: + push: + branches: + - master + +jobs: + docs: + runs-on: macos-12 + env: + XCODE_VERSION: ${{ '13.3.1' }} + steps: + - uses: actions/checkout@v2 + - name: Select Xcode + run: "sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app" + - name: "Generate documentation" + run: "swift package --allow-writing-to-directory ./docs generate-documentation --target XCRemoteCache --disable-indexing --transform-for-static-hosting --output-path ./docs --hosting-base-path XCRemoteCache/" + - name: Deploy GH-pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs + keep_files: false diff --git a/Package.resolved b/Package.resolved index 7392b47..2205fb4 100644 --- a/Package.resolved +++ b/Package.resolved @@ -37,6 +37,15 @@ "version": "0.0.5" } }, + { + "package": "SwiftDocCPlugin", + "repositoryURL": "https://github.com/apple/swift-docc-plugin", + "state": { + "branch": null, + "revision": "3303b164430d9a7055ba484c8ead67a52f7b74f6", + "version": "1.0.0" + } + }, { "package": "XcodeProj", "repositoryURL": "https://github.com/tuist/XcodeProj.git", diff --git a/Package.swift b/Package.swift index 199acb1..67608c2 100644 --- a/Package.swift +++ b/Package.swift @@ -17,6 +17,7 @@ let package = Package( .package(url: "https://github.com/jpsim/Yams.git", from: "5.0.0"), .package(url: "https://github.com/apple/swift-argument-parser", from: "0.0.1"), .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.7.1"), + .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), ], targets: [ .target( diff --git a/README.md b/README.md index 254b231..ebe3d32 100755 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ _XCRemoteCache is a remote cache tool for Xcode projects. It reuses target artif [![Build Status](https://github.com/spotify/XCRemoteCache/workflows/CI/badge.svg)](https://github.com/spotify/XCRemoteCache/workflows/CI/badge.svg) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![Slack](https://slackin.spotify.com/badge.svg)](https://slackin.spotify.com) +[![Docs](https://spotify.github.io/XCRemoteCache/documentation/xcremotecache/)](https://github.com/spotify/XCRemoteCache/workflows/Docs/badge.svg) - [How and Why?](#how-and-why) * [Accurate target input files](#accurate-target-input-files) diff --git a/docs/Development.md b/docs/Development.md index af317d7..9312bd2 100644 --- a/docs/Development.md +++ b/docs/Development.md @@ -1,5 +1,7 @@ ## Development - How to build +Generated [docs](https://spotify.github.io/XCRemoteCache/documentation/xcremotecache/). + ### Building the library: `CONFIG=Debug rake build` From 3f9596f6e6690b742ba7f6b6da205d8019acb5d4 Mon Sep 17 00:00:00 2001 From: Bartosz Polaczyk Date: Sat, 7 May 2022 18:00:43 +0200 Subject: [PATCH 2/2] Bump to Xcode 13.3.1 --- .github/workflows/ci.yaml | 4 ++-- .github/workflows/release.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b90eb43..7513481 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,9 +13,9 @@ jobs: args: --strict macOS: - runs-on: macOS-latest + runs-on: macos-12 env: - XCODE_VERSION: ${{ '13.1' }} + XCODE_VERSION: ${{ '13.3.1' }} steps: - name: Select Xcode run: "sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9219695..54c42a2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,9 +6,9 @@ on: jobs: macOS: name: Add macOS binaries to release - runs-on: macOS-latest + runs-on: macos-12 env: - XCODE_VERSION: ${{ '13.1' }} + XCODE_VERSION: ${{ '13.3.1' }} steps: - name: Select Xcode run: "sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app"