Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs (envvars): Improve documentation on available environment variables #60

Merged
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
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Generation of release notes is presently *limited* to the module's [valid tags p

**Note:** Ensure your main project's CI file(s) and/or settings are configured to run CI jobs for tag refs.

To create releases, reference the appropriate `release.yml` entrypoint CI template provided by this project from your CI file. The **release** step can also be customized through provided [parameters](docs/samples/ci/azure-pipelines/custom/azure-pipelines.release.yml#L4-#L20).
To create releases, reference the appropriate `release.yml` entrypoint CI template provided by this project from your CI file. The **release** step can also be customized through provided [parameters](docs/samples/ci/azure-pipelines/custom/azure-pipelines.release.yml#L4-#L21).

Releases supports all tag refs. Tags *need not* follow [Semantic Versioning](https://semver.org/) though the convention is recommended.

Expand All @@ -127,30 +127,30 @@ Releases supports all tag refs. Tags *need not* follow [Semantic Versioning](htt

###### Generate and Release

| Name | Value | Mandatory | Type |
| Name | Example value | Mandatory | Type |
|:-:|:-:|:-:|:-:|
| `PROJECT_DIRECTORY` | `/path/to/repository` | true | string |
| `RELEASE_TAG_REF` | `vx.x.x` | true | string |
| `PROJECT_DIRECTORY` | `/path/to/my-project` | true | string |
| `RELEASE_TAG_REF` | `vx.x.x` / `branch` / `HEAD` / `remote/branch` / commit-hash | true | string |

###### Generate

| Name | Value | Mandatory | Type |
| Name | Example value | Mandatory | Type |
|:-:|:-:|:-:|:-:|
| `RELEASE_NOTES_VARIANT` | `VersionDate-HashSubject-NoMerges` | false | string |
| `RELEASE_NOTES_PATH` | `/path/to/repository/.release-notes.md` (full)<br>`.release-notes.md` (relative) | false | string |
| `RELEASE_NOTES_VARIANT` | `VersionDate-HashSubject-NoMerges` ([List of available variants](src/PSRepositoryReleaseManager/generate/variants)) | false | string |
| `RELEASE_NOTES_PATH` | `/path/to/.release-notes.md` (full) /<br>`.release-notes.md` (relative) | false | string |

###### Release

| Name | <center>Value</center> | Mandatory | Type |
|:-:|:-|:-:|:-:|
| `RELEASE_NAMESPACE` | <center>`mygithubnamespace`</center> | true | string |
| `RELEASE_REPOSITORY` | <center>`my-project`</center> | true | string |
| `GITHUB_API_TOKEN` | <center>`xxx`</center> | true | string |
| `RELEASE_NAME` | <center>`My release name`</center> | false | string |
| `RELEASE_NOTES_CONTENT` | <pre><code>My<br>multi-line<br>release<br>notes</code></pre> | false | string |
| `RELEASE_DRAFT` | <center>`true` / `false`</center> | false | string |
| `RELEASE_PRERELEASE` | <center>`true` / `false`</center> | false | string |
| `RELEASE_ASSETS` | <pre><code>path/to/asset1.tar.gz<br>path/to/asset2.gz<br>path/to/asset3.zip<br>path/to/assets/*.gz<br>path/to/assets/*.zip</code></pre> | false | string |
| Name | Example value | Mandatory | Type |
|:-:|-|:-:|:-:|
| `RELEASE_NAMESPACE` | `mygithubnamespace` | true | string |
| `RELEASE_REPOSITORY` | `my-project` | true | string |
| `GITHUB_API_TOKEN` | `xxx` | true | string |
| `RELEASE_NAME` | `My release name` | false | string |
| `RELEASE_NOTES_CONTENT` | `My`<br><br>`multi-line`<br>`release`<br>`notes` | false | string ([multiline](https://en.wikipedia.org/wiki/Here_document)) |
| `RELEASE_DRAFT` | `true` / `false` | false | string |
| `RELEASE_PRERELEASE` | `true` / `false` | false | string |
| `RELEASE_ASSETS` | `path/to/asset1.tar.gz`<br>`path/to/asset2.gz`<br>`path/to/asset3.zip`<br>`path/to/assets/*.gz`<br>`path/to/assets/*.zip` | false | string ([multiline](https://en.wikipedia.org/wiki/Here_document)) |

##### Commands

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ steps:
- template: templates/azure-pipelines/entrypoint/release.yml@PSRepositoryReleaseManager
# parameters:
# NAME: My release name
# NOTES_PATH: path/to/my-release-notes.md
# NOTES_PATH: /path/to/.release-notes.md
# # NOTES_CONTENT: |
# # My
# #
# # multi-line
# # release
# # notes
Expand Down
12 changes: 6 additions & 6 deletions src/scripts/ci/Invoke-Generate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ $env:RELEASE_TAG_REF = 'v1.0.12'
./Invoke-Generate.ps1

# Default release notes variant and release notes path
$env:PROJECT_DIRECTORY = '/path/to/repository'
$env:PROJECT_DIRECTORY = '/path/to/my-project'
$env:RELEASE_TAG_REF = 'v1.0.12'
./Invoke-Generate.ps1

# Default release notes path
$env:PROJECT_DIRECTORY = '/path/to/repository'
$env:PROJECT_DIRECTORY = '/path/to/my-project'
$env:RELEASE_TAG_REF = 'v1.0.12'
$env:RELEASE_NOTES_VARIANT = 'Changes-HashSubject-NoMerges'
./Invoke-Generate.ps1

# Custom -ReleaseNotesPath relative to -ProjectDirectory
$env:PROJECT_DIRECTORY = '/path/to/repository'
$env:PROJECT_DIRECTORY = '/path/to/my-project'
$env:RELEASE_TAG_REF = 'v1.0.12'
$env:RELEASE_NOTES_VARIANT = 'Changes-HashSubject-NoMerges'
$env:RELEASE_NOTES_PATH = 'my-custom-release-notes.md'
$env:RELEASE_NOTES_PATH = '.release-notes.md'
./Invoke-Generate.ps1

# No defaults
$env:PROJECT_DIRECTORY = '/path/to/repository'
$env:PROJECT_DIRECTORY = '/path/to/my-project'
$env:RELEASE_TAG_REF = 'v1.0.12'
$env:RELEASE_NOTES_VARIANT = 'Changes-HashSubject-NoMerges'
$env:RELEASE_NOTES_PATH = '/path/to/repository/.release-notes.md'
$env:RELEASE_NOTES_PATH = '/path/to/.release-notes.md'
./Invoke-Generate.ps1

#>
Expand Down