diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json deleted file mode 100644 index 754ec0c..0000000 --- a/.github/linters/.jscpd.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "threshold": 0, - "reporters": [ - "consoleFull" - ], - "ignore": [ - "**/tests/**", - "**/scripts/**" - ], - "absolute": true -} diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml index cf13018..05f128c 100644 --- a/.github/workflows/Linter.yml +++ b/.github/workflows/Linter.yml @@ -29,6 +29,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} VALIDATE_BIOME_FORMAT: false + VALIDATE_JSCPD: false VALIDATE_JSON_PRETTIER: false VALIDATE_MARKDOWN_PRETTIER: false VALIDATE_YAML_PRETTIER: false diff --git a/.github/workflows/Auto-Release.yml b/.github/workflows/Release.yml similarity index 71% rename from .github/workflows/Auto-Release.yml rename to .github/workflows/Release.yml index daeed4c..106730e 100644 --- a/.github/workflows/Auto-Release.yml +++ b/.github/workflows/Release.yml @@ -1,6 +1,6 @@ -name: Auto-Release +name: Release -run-name: "Auto-Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" +run-name: "Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" on: pull_request: @@ -12,6 +12,9 @@ on: - reopened - synchronize - labeled + paths: + - 'action.yml' + - 'src/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -22,7 +25,7 @@ permissions: pull-requests: write jobs: - Auto-Release: + Release: runs-on: ubuntu-latest steps: - name: Checkout Code @@ -30,7 +33,7 @@ jobs: with: persist-credentials: false - - name: Auto-Release + - name: Release uses: ./ with: IncrementalPrerelease: false diff --git a/README.md b/README.md index 7118218..d6d992d 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# Auto-Release +# Release-GHRepository Automatically creates releases based on pull requests and labels. ## Specifications and practices -Auto-Release follows: +Release-GHRepository follows: - [SemVer 2.0.0 specifications](https://semver.org) - [GitHub Flow specifications](https://docs.github.com/en/get-started/using-github/github-flow) @@ -26,7 +26,7 @@ The following labels will inform the action what kind of release to create: - `patch` - `fix` -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. +When a pull request is closed, the action will create a release based on the labels and clean up any previous prereleases that were created. > [!NOTE] > The labels can be configured using the `MajorLabels`, `MinorLabels` and `PatchLabels` parameters/settings in the configuration file to trigger @@ -65,7 +65,7 @@ The action can be configured using the following settings: The configuration file is a YAML file that can be used to configure the action. By default, the configuration file is expected at `.github\auto-release.yml`, which can be changed using the `ConfigurationFile` setting. -The actions configuration can be change by altering the settings in the configuration file. +The action's configuration can be changed by altering the settings in the configuration file. ```yaml DatePrereleaseFormat: 'yyyyMMddHHmm' @@ -77,10 +77,10 @@ This example uses the date format for the prerelease, disables the incremental p ## Example -Add a workflow in you repository using the following example: +Add a workflow in your repository using the following example: ```yaml -name: Auto-Release +name: Release-GHRepository on: pull_request_target: @@ -97,14 +97,14 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} jobs: - Auto-Release: + Release-GHRepository: runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v4 - - name: Auto-Release - uses: PSModule/Auto-Release@v1 + - name: Release-GHRepository + uses: PSModule/Release-GHRepository@v1 ``` ## Permissions diff --git a/action.yml b/action.yml index cc1538a..aa41bfe 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -name: Auto Release (by PSModule) +name: Release GHRepository (by PSModule) description: Automatically creates releases based on pull requests and labels. author: PSModule branding: @@ -93,8 +93,8 @@ inputs: runs: using: composite steps: - - name: Auto-Release - uses: PSModule/GitHub-Script@e827bea46d70eebc668bdd59e4654e0846177da4 # v1.7.9 + - name: Release-GHRepository + uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10 env: PSMODULE_AUTO_RELEASE_INPUT_AutoCleanup: ${{ inputs.AutoCleanup }} PSMODULE_AUTO_RELEASE_INPUT_AutoPatching: ${{ inputs.AutoPatching }} @@ -117,8 +117,8 @@ runs: Prerelease: ${{ inputs.Prerelease }} Verbose: ${{ inputs.Verbose }} Version: ${{ inputs.Version }} - Name: Auto-Release + Name: Release-GHRepository WorkingDirectory: ${{ inputs.WorkingDirectory }} Script: | - # Auto-Release - ${{ github.action_path }}/scripts/main.ps1 + # Release-GHRepository + ${{ github.action_path }}/src/main.ps1 diff --git a/scripts/main.ps1 b/src/main.ps1 similarity index 100% rename from scripts/main.ps1 rename to src/main.ps1