From 27a7f3e71d18e562bf80a84b46bb7146369597ad Mon Sep 17 00:00:00 2001 From: Florian Friedrich Date: Mon, 9 Oct 2023 07:56:45 +0200 Subject: [PATCH] Extend documentation --- README.md | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 8124605..b38de59 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Xcodebuild Action +# Xcodebuild Action [![Tests](https://github.com/sersoft-gmbh/xcodebuild-action/actions/workflows/tests.yml/badge.svg)](https://github.com/sersoft-gmbh/xcodebuild-action/actions/workflows/tests.yml) @@ -8,7 +8,8 @@ Note that this action needs to run on macOS. All other platforms will fail! ## Inputs -See [action.yml](action.yml) for an overview of all inputs. +See [action.yml](action.yml) for an overview of all inputs.
+For more information about the various inputs, also see `man xcodebuild`. ## Outputs @@ -20,27 +21,28 @@ The unprocessed command from which the executed command was resolved. E.g. paths The command that was executed by this action. This will also be printed to the action output. -## Compatibility Projects: +## Example Usage -You can run this action with these dependency managers: -| Type | Status | -|--------------------|:------------:| -| CocoaPods | ✅ | -| Swift Package Manager | ✅ | +
+Example using a Swift Package -> If you are not using a dependency manager, you can still utilize this action ✅.
+**Note:** If you have multiple products in your package, Xcode will auto-generate a `my-tool-Package` scheme, where `my-tool` is the name of your package. If you only have one product, or wish to only build a specific product, you can use the product name as scheme directly. -## Action attribute -The action to perform (e.g. build, test, ...). Can also contain multiple actions, for default is **test** +```yaml +uses: sersoft-gmbh/xcodebuild-action@v3 +with: + spm-package: './' + scheme: my-tool-Package + destination: platform=macOS + action: test +``` +
-| Action | Description | -|----------|--------------------------------------------------------------------------------------------------------------| -| build | This action is used to compile the project. It generates the necessary binary files for the application. | -| test | The "test" action is used to execute tests in the project, ensuring the code functions correctly. | +
+Example using an Xcode project (xcodeproj) -## Example Usage +This will run tests configured with the `MyApp` scheme inside a `MyApp` Xcode project. -Use the following snippet when you want to run tests configured with the `MyApp` scheme inside a `MyApp` Xcode project: ```yaml uses: sersoft-gmbh/xcodebuild-action@v3 with: @@ -49,10 +51,14 @@ with: destination: platform=macOS action: test ``` +
+
-Example for CocoaPods: - -> If the CocoaPods dependencies are already present in the repository, you don't need to do anything except passing the workspace +Example using an Xcode workspace (xcworkspace) + +This will run tests configured with the `MyApp` scheme inside a `MyApp` Xcode workspace. + +**Note for CocoaPods:** Restoring the CocoaPods dependencies has to be done before running this action. ```yaml uses: sersoft-gmbh/xcodebuild-action@v3 @@ -63,5 +69,3 @@ with: action: test ```
- -