Skip to content

Commit 1b99f12

Browse files
authored
Create macOS.yml (#2)
* Create macOS.yml * Create docc.yml
1 parent 1e1e2a8 commit 1b99f12

File tree

4 files changed

+64
-25
lines changed

4 files changed

+64
-25
lines changed

.github/workflows/docc.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: docc
2+
on:
3+
push:
4+
branches: ["main"]
5+
permissions:
6+
contents: read
7+
pages: write
8+
id-token: write
9+
concurrency:
10+
group: pages
11+
cancel-in-progress: true
12+
jobs:
13+
pages:
14+
environment:
15+
name: github-pages
16+
url: '${{ steps.deployment.outputs.page_url }}'
17+
runs-on: macos-13
18+
steps:
19+
- uses: swift-actions/setup-swift@v1
20+
- name: git checkout
21+
uses: actions/checkout@v3
22+
- name: docbuild
23+
run: >
24+
sudo xcode-select -s /Applications/Xcode_15.0.app;
25+
xcodebuild docbuild -scheme FeedbackKit \
26+
-derivedDataPath /tmp/docbuild \
27+
-destination 'generic/platform=iOS';
28+
$(xcrun --find docc) process-archive \
29+
transform-for-static-hosting /tmp/docbuild/Build/Products/Debug-iphoneos/FeedbackKit.doccarchive \
30+
--output-path docs \
31+
--hosting-base-path 'FeedbackKit';
32+
echo "<script>window.location.href +=
33+
\"/documentation/feedbackkit\"</script>" > docs/index.html;
34+
- name: artifacts
35+
uses: actions/upload-pages-artifact@v1
36+
with:
37+
path: docs
38+
- name: deploy
39+
id: deployment
40+
uses: actions/deploy-pages@v1

.github/workflows/macOS.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This workflow will build a Swift project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
3+
4+
name: macOS
5+
6+
on:
7+
push:
8+
branches: ["**"]
9+
10+
jobs:
11+
build:
12+
runs-on: macos-13
13+
14+
steps:
15+
- uses: swift-actions/setup-swift@v1
16+
- uses: maxim-lobanov/setup-xcode@v1
17+
with:
18+
xcode-version: latest-stable
19+
- uses: actions/checkout@v3
20+
- name: Build for release
21+
run: swift build -v -c release
22+
- name: Test
23+
run: swift test -v

Package.resolved

Lines changed: 0 additions & 24 deletions
This file was deleted.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.10
1+
// swift-tools-version: 5.9
22

33
import PackageDescription
44

0 commit comments

Comments
 (0)