diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..4a95e51 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,26 @@ +template: | + $CHANGES +categories: + - title: "๐Ÿš€ Features" + labels: + - enhancement + - title: "๐Ÿ› Bug Fixes" + labels: + - bug + - title: "๐Ÿงน Chores" + labels: + - chore +tag-template: "v$NEXT_PATCH_VERSION" +name-template: "Release v$NEXT_PATCH_VERSION" +change-template: "- $TITLE (#$NUMBER) @$AUTHOR" +no-changes-template: "* No changes" +autolabeler: + - label: enhancement + title: + - "/^feat/" + - label: bug + title: + - "/^fix/" + - label: chore + title: + - "/^chore/" diff --git a/.github/release-wizard.md b/.github/release-wizard.md deleted file mode 100644 index 85632ca..0000000 --- a/.github/release-wizard.md +++ /dev/null @@ -1,11 +0,0 @@ -## :package: Changelog - -$CHANGES - -## PRs - -$PULL_REQUESTS - -## Contributors - -$CONTRIBUTORS diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 59bd983..e22d452 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,36 +1,60 @@ -name: Reusable Release +name: Reusable Release Drafter on: workflow_call: inputs: - draft: + runner: + required: false + description: Runner type + default: ubuntu-latest + type: string + configName: + required: false + description: The path within the .github/ folder for the release drafter configuration + type: string + name: + required: false + description: The name that will be used in the GitHub release that's created or updated. This will override any name-template specified in your release-drafter.yml if defined. + type: string + tag: + required: false + description: The tag name to be associated with the GitHub release that's created or updated. This will override any tag-template specified in your release-drafter.yml if defined. + type: string + version: + required: false + description: The version to be associated with the GitHub release that's created or updated. This will override any version calculated by the release-drafter. + type: string + publish: required: false - description: Defines if the release is a draft (not published directly). Defaults to true - default: true + description: A boolean indicating whether the release being created or updated should be immediately published. This may be useful if the output of a previous workflow step determines that a new version of your project has been (or will be) released, as with salsify/action-detect-and-tag-new-version. type: boolean prerelease: required: false - description: Defines if the release to create is a prerelease. Defaults to false + description: A boolean indicating whether the release being created or updated is a prerelease. + type: boolean + prerelease-identifier: + required: false + description: A string indicating an identifier (alpha, beta, rc, etc), to increment the prerelease version. number + type: string + disable-releaser: + required: false + description: A boolean indicating whether the releaser mode is disabled. default: false type: boolean - runner: + latest: required: false - description: Runner type - default: ubuntu-latest + description: A string indicating whether the release being created or updated should be marked as latest. type: string - targetBranch: + commitish: required: false - description: The target branch for the release being created - default: main + description: A string specifying the target branch for the release being created. type: string - taskPrefix: + header: required: false - description: The prefix that identifies task ids in the commits - default: JIR- + description: A string that would be added before the template body. type: string - templatePath: + footer: required: false - description: The path within the .github/ folder for the release drafter configuration - default: release-wizard.md + description: A string that would be added after the template body. type: string secrets: repoAccessToken: @@ -40,11 +64,20 @@ jobs: release: runs-on: ${{ inputs.runner }} steps: - - name: Create Github release - uses: darioblanco/release-wizard@v2.0.4 + - name: Create/Update Release Draft + uses: release-drafter/release-drafter@v6 with: - draft: ${{ inputs.draft }} + config-name: "release-drafter.yml" + name: ${{ inputs.name }} + tag: ${{ inputs.tag }} + version: ${{ inputs.version }} + publish: ${{ inputs.publish }} prerelease: ${{ inputs.prerelease }} - taskPrefix: ${{ inputs.taskPrefix }} - token: ${{ secrets.repoAccessToken }} - templatePath: ${{ inputs.templatePath }} + prerelease-identifier: ${{ inputs.prerelease-identifier }} + disable-releaser: ${{ inputs.disable-releaser }} + latest: ${{ inputs.latest }} + commitish: ${{ inputs.commitish }} + header: ${{ inputs.header }} + footer: ${{ inputs.footer }} + env: + GITHUB_TOKEN: ${{ secrets.repoAccessToken }}