Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift

name: Swift

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
37 changes: 37 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// swift-tools-version: 5.8
import PackageDescription

let package = Package(
name: "SwiftSH",
platforms: [
.macOS(.v13), // You can change this if you want iOS support
.iOS(.v16)
],
products: [
.library(
name: "SwiftSH",
targets: ["SwiftSH"]
),
],
dependencies: [
// Add dependencies if needed, for example SwiftNIO
.package(url: "https://github.com/MyTechBlitz3000/SwiftSH.git", from: "1.0.0")
],
targets: [
.target(
name: "SwiftSH",
dependencies: [
.product(name: "NIO", package: "swift-nio") // Example: adjust if you use NIO
],
path: ".", // The root folder has the SwiftSH.swift file
exclude: ["Tests", "README.md", "LICENSE.md"], // exclude non-source files
sources: ["SwiftSH.swift"], // all main source files here
publicHeadersPath: nil
),
.testTarget(
name: "SwiftSHTests",
dependencies: ["SwiftSH"],
path: "Tests" // Create this folder if you want tests
)
]
)