Skip to content
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
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ The following labels will inform the action what kind of release to create:

When a pull request is closed, the action will create a release based on the labels and clean up any previous prereleases that was created.

> Note: The labels can be configured using the `MajorLabels`, `MinorLabels` and `PatchLabels` parameters/settings in the configuration file to trigger on other labels.
> [!NOTE]
> The labels can be configured using the `MajorLabels`, `MinorLabels` and `PatchLabels` parameters/settings in the configuration file to trigger
> on other labels.

## Usage

Expand All @@ -48,6 +50,11 @@ The action can be configured using the following settings:
| `PatchLabels` | A comma separated list of labels that trigger a patch release. | `patch, fix` | false |
| `VersionPrefix` | The prefix to use for the version number. | `v` | false |
| `WhatIf` | Control wether to simulate the action. If enabled, the action will not create any releases. Used for testing. | `false` | false |
| `Debug` | Enable debug output. | `'false'` | false |
| `Verbose` | Enable verbose output. | `'false'` | false |
| `Version` | Specifies the exact version of the GitHub module to install. | | false |
| `Prerelease` | Allow prerelease versions if available. | `'false'` | false |
| `WorkingDirectory` | The working directory where the script runs. | `${{ github.workspace }}` | false |

### Configuration file

Expand Down
52 changes: 38 additions & 14 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,51 @@ inputs:
description: If specified, the action will only log the changes it would make, but will not actually create or delete any releases or tags.
required: false
default: 'false'
Debug:
description: Enable debug output.
required: false
default: 'false'
Verbose:
description: Enable verbose output.
required: false
default: 'false'
Version:
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
required: false
Prerelease:
description: Allow prerelease versions if available.
required: false
default: 'false'
WorkingDirectory:
description: The working directory where the script will run from.
required: false
default: ${{ github.workspace }}

runs:
using: composite
steps:
- name: Auto-Release
uses: PSModule/GitHub-Script@v1
env:
GITHUB_ACTION_INPUT_AutoCleanup: ${{ inputs.AutoCleanup }}
GITHUB_ACTION_INPUT_AutoPatching: ${{ inputs.AutoPatching }}
GITHUB_ACTION_INPUT_ConfigurationFile: ${{ inputs.ConfigurationFile }}
GITHUB_ACTION_INPUT_CreateMajorTag: ${{ inputs.CreateMajorTag }}
GITHUB_ACTION_INPUT_CreateMinorTag: ${{ inputs.CreateMinorTag }}
GITHUB_ACTION_INPUT_DatePrereleaseFormat: ${{ inputs.DatePrereleaseFormat }}
GITHUB_ACTION_INPUT_IgnoreLabels: ${{ inputs.IgnoreLabels }}
GITHUB_ACTION_INPUT_IncrementalPrerelease: ${{ inputs.IncrementalPrerelease }}
GITHUB_ACTION_INPUT_MajorLabels: ${{ inputs.MajorLabels }}
GITHUB_ACTION_INPUT_MinorLabels: ${{ inputs.MinorLabels }}
GITHUB_ACTION_INPUT_PatchLabels: ${{ inputs.PatchLabels }}
GITHUB_ACTION_INPUT_VersionPrefix: ${{ inputs.VersionPrefix }}
GITHUB_ACTION_INPUT_WhatIf: ${{ inputs.WhatIf }}
PSMODULE_AUTO_RELEASE_INPUT_AutoCleanup: ${{ inputs.AutoCleanup }}
PSMODULE_AUTO_RELEASE_INPUT_AutoPatching: ${{ inputs.AutoPatching }}
PSMODULE_AUTO_RELEASE_INPUT_ConfigurationFile: ${{ inputs.ConfigurationFile }}
PSMODULE_AUTO_RELEASE_INPUT_CreateMajorTag: ${{ inputs.CreateMajorTag }}
PSMODULE_AUTO_RELEASE_INPUT_CreateMinorTag: ${{ inputs.CreateMinorTag }}
PSMODULE_AUTO_RELEASE_INPUT_DatePrereleaseFormat: ${{ inputs.DatePrereleaseFormat }}
PSMODULE_AUTO_RELEASE_INPUT_IgnoreLabels: ${{ inputs.IgnoreLabels }}
PSMODULE_AUTO_RELEASE_INPUT_IncrementalPrerelease: ${{ inputs.IncrementalPrerelease }}
PSMODULE_AUTO_RELEASE_INPUT_MajorLabels: ${{ inputs.MajorLabels }}
PSMODULE_AUTO_RELEASE_INPUT_MinorLabels: ${{ inputs.MinorLabels }}
PSMODULE_AUTO_RELEASE_INPUT_PatchLabels: ${{ inputs.PatchLabels }}
PSMODULE_AUTO_RELEASE_INPUT_VersionPrefix: ${{ inputs.VersionPrefix }}
PSMODULE_AUTO_RELEASE_INPUT_WhatIf: ${{ inputs.WhatIf }}
with:
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
Script: |
# Auto-Release
${{ github.action_path }}\scripts\main.ps1
${{ github.action_path }}/scripts/main.ps1
Loading