Skip to content

Commit

Permalink
Extend documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ffried committed Oct 9, 2023
1 parent e2c65f3 commit 27a7f3e
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# <img src="https://avatars.githubusercontent.com/u/17783361?s=48&amp;v=4" width="24" height="24"> 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)

Expand All @@ -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.<br/>
For more information about the various inputs, also see `man xcodebuild`.

## Outputs

Expand All @@ -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 ||
<details>
<summary>Example using a Swift Package</summary>

> If you are not using a dependency manager, you can still utilize this action ✅.<br>
**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
```
</details>

| 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. |
<details>
<summary>Example using an Xcode project (<code>xcodeproj</code>)</summary>

## 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:
Expand All @@ -49,10 +51,14 @@ with:
destination: platform=macOS
action: test
```
</details>

<details>
<summary>Example for CocoaPods:</summary>

> If the CocoaPods dependencies are already present in the repository, you don't need to do anything except passing the workspace
<summary>Example using an Xcode workspace (<code>xcworkspace</code>)</summary>

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
Expand All @@ -63,5 +69,3 @@ with:
action: test
```
</details>


0 comments on commit 27a7f3e

Please sign in to comment.