diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..411ff3b --- /dev/null +++ b/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "github-toolkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/asielcabrera/github-toolkit.git", + "state" : { + "revision" : "662c84a0c199889d2e50bf1c45c23bfb4f1479ba", + "version" : "0.0.11" + } + } + ], + "version" : 2 +} diff --git a/Package.swift b/Package.swift index 1467514..8591864 100644 --- a/Package.swift +++ b/Package.swift @@ -8,7 +8,6 @@ let package = Package( dependencies: [ .package(url: "https://github.com/asielcabrera/github-toolkit.git", from: "0.0.1"), - .package(url: "https://github.com/asielcabrera/Terminal.git", from: "0.0.1") ], targets: [ @@ -16,8 +15,6 @@ let package = Package( name: "Test_Github_Action", dependencies: [ .product(name: "Core", package: "github-toolkit"), - .product(name: "Github", package: "github-toolkit"), - "Terminal" ], path: "Sources"), ] diff --git a/Sources/Action.swift b/Sources/Action.swift index eb9552c..a4602ce 100644 --- a/Sources/Action.swift +++ b/Sources/Action.swift @@ -6,50 +6,13 @@ // import Core -// import Terminal + @main struct Action { static func main() async { -// do { - - // Create a directory -// let directoryPath = "my_directory" -// try Core.Directory.create(atPath: directoryPath) -// -// -// -//// Create a file within the directory -// let filePath = "\(directoryPath)/my_file.txt" -// let fileContent = "Hello, World!".data(using: .utf8) -// try Core.File.create(atPath: filePath, contents: fileContent) - -// // Read the contents of the file -// let fileData = try Core.File.read(atPath: filePath) -// if let fileString = String(data: fileData, encoding: .utf8) { -// print("Contenido del archivo: \(fileString)") -// } -// -// // Move the file to another directory -// let newDirectoryPath = "\(workspace)/new_directory" -// try Core.Directory.create(atPath: newDirectoryPath) -// _ = "\(newDirectoryPath)/my_file.txt" -// // try Core.File.moveItem(atPath: filePath, toPath: newFilePath) -// -// // Delete the directory and its contents -// try Core.Directory.delete(atPath: directoryPath) -// try Core.Directory.delete(atPath: newDirectoryPath) -// } catch { -// print("Error: \(error)") -// } - let myInput = Core.Inputs.getInput(name: "myInput") - print("Name: \(myInput ?? "N/A")") - -// let optionalInput = Core.getInput(name: "optionalInput") -// print("OptionalInput: \(optionalInput ?? "N/A")") -// Core.Outputs - Core.Outputs.setOutput(name: "myOutput", value: "Testing the output") -// Core.Outputs.setOutput(name: "myOutput", value: "Probando el output ") + let myInput = try! Core.getInput("myinput") + print(myInput) } }