Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
radoslaw-panuszewski committed Oct 21, 2024
1 parent f25f02b commit 1340715
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 15 deletions.
13 changes: 1 addition & 12 deletions docs/configuration/basic_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,7 @@ Version calculation rules:

### GitHub workflow context

If `release` task is executed in GitHub workflow it will generate an output variable `released-version`
that you can access later on in your workflow steps.

```
jobs:
build:
runs-on: ubuntu-latest
steps:
- id: release
run: ./gradlew release
- run: echo ${{steps.release.outputs.released-version}}
```
See [GitHub outputs](ci_servers.md#github-outputs)

## Accessing previous version

Expand Down
34 changes: 31 additions & 3 deletions docs/configuration/ci_servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,38 @@ This behavior is experimental and has been tested on the following CI servers:

`axion-release` has dedicated support for GitHub Actions and you don't need any custom configs to make it working.

Here's what Axion does for you under the hood:
### GitHub outputs

- gets the original branch name for workflows triggered by `pull_request` -
see [versionWithBranch](version.md#versionwithbranch-default)
To make it easier for you to chain jobs in a workflow, `axion-release` will provide some information as GitHub outputs.

| name | description |
|---------------------|---------------------------------------------|
| `released-version` | Provided after executing the `release` task |
| `published-version` | Provided after executing the `publish` task |

#### Multi-module builds

If all your subprojects use the same version, the output will be a single value, such as:
```
1.0.0
```

However, if each subproject has its own version, the output will be in JSON format, for example:
```json
{"root-project":"1.0.0","sub-project":"2.0.0"}
```

#### Example

```
jobs:
build:
steps:
- id: release
run: ./gradlew release
- run: echo ${{ steps.release.outputs.released-version }}
```

## Jenkins

Expand Down

0 comments on commit 1340715

Please sign in to comment.