From 88d62a793b3b15b891f9cf23c8effe923dfc097d Mon Sep 17 00:00:00 2001 From: Vladimir Antropov Date: Mon, 10 Jun 2024 19:47:40 +0300 Subject: [PATCH] Merge to v4 2024 06 10 (#56) feat: create release action without tag-changelog and assets steps merge v4-beta to v4 --- actions/release/create-with-tag/action.yaml | 222 ++++++++++++++++++++ actions/release/create/action.yaml | 10 +- 2 files changed, 227 insertions(+), 5 deletions(-) create mode 100644 actions/release/create-with-tag/action.yaml diff --git a/actions/release/create-with-tag/action.yaml b/actions/release/create-with-tag/action.yaml new file mode 100644 index 00000000..056098b8 --- /dev/null +++ b/actions/release/create-with-tag/action.yaml @@ -0,0 +1,222 @@ +name: Create Release with Tag +author: 'MiLaboratories' +description: | + Creates github releases. + See original action ncipollo/release-action + +inputs: + allowUpdates: + description: | + An optional flag which indicates if we should update + a release if it already exists. Defaults to false. + required: false + default: '' + artifactErrorsFailBuild: + description: | + An optional flag which indicates if artifact + read or upload errors should fail the build. + required: false + default: '' + artifact: + deprecationMessage: Use 'artifacts' instead. + description: | + An optional set of paths representing artifacts to upload to the release. + This may be a single path or a comma delimited list of paths (or globs). + required: false + default: '' + artifacts: + description: | + An optional set of paths representing artifacts to upload to the release. + This may be a single path or a comma delimited list of paths (or globs). + required: false + default: '' + artifactContentType: + description: | + The content type of the artifact. Defaults to raw. + required: false + default: '' + body: + description: | + An optional body for the release. + required: false + default: '' + bodyFile: + description: | + An optional body file for the release. + This should be the path to the file. + required: false + default: '' + commit: + description: | + An optional commit reference. + This will be used to create the tag if it does not exist. + required: false + default: '' + discussionCategory: + description: | + When provided this will generate a discussion of the specified category. + The category must exist otherwise this will cause the action to fail. + This isn't used with draft releases. + required: false + default: '' + draft: + description: | + Optionally marks this release as a draft release. + Set to true to enable. + required: false + default: '' + generateReleaseNotes: + description: | + Indicates if release notes should be automatically generated. + required: false + default: 'false' + makeLatest: + description: | + Indicates if the release should be the 'latest' release or not. + required: false + default: 'legacy' + name: + description: | + An optional name for the release. + If this is omitted the tag will be used. + required: false + default: '' + omitBody: + description: | + Indicates if the release body should be omitted. + required: false + default: 'false' + omitBodyDuringUpdate: + description: | + Indicates if the release body should be omitted during updates. + The body will still be applied for newly created releases. + This will preserve the existing body during updates. + required: false + default: 'false' + omitDraftDuringUpdate: + description: | + Indicates if the draft flag should be omitted during updates. + The draft flag will still be applied for newly created releases. + This will preserve the existing draft state during updates. + required: false + default: 'false' + omitName: + description: | + Indicates if the release name should be omitted. + required: false + default: 'false' + omitNameDuringUpdate: + description: | + Indicates if the release name should be omitted during updates. + The name will still be applied for newly created releases. + This will preserve the existing name during updates. + required: false + default: 'false' + omitPrereleaseDuringUpdate: + description: | + Indicates if the prerelease flag should be omitted during updates. + The prerelease flag will still be applied for newly created releases. + This will preserve the existing prerelease state during updates. + required: false + default: 'false' + owner: + description: | + Optionally specify the owner of the repo where the release should be generated. + Defaults to current repo's owner. + required: false + default: '' + prerelease: + description: | + Optionally marks this release as prerelease. + Set to true to enable. + required: false + default: '' + removeArtifacts: + description: | + Indicates if existing release artifacts should be removed, + Defaults to false. + required: false + default: 'false' + replacesArtifacts: + description: | + Indicates if existing release artifacts should be replaced. + Defaults to true. + required: false + default: 'true' + repo: + description: | + Optionally specify the repo where the release should be generated. + Defaults to current repo. + required: false + default: '' + skipIfReleaseExists: + description: | + When skipIfReleaseExists is enabled the action will + be skipped if a non-draft release already exists for the provided tag. + required: false + default: 'false' + tag: + description: | + An optional tag for the release. + If this is omitted the git ref will be used (if it is a tag). + required: false + default: '' + token: + description: | + The Github token. + required: false + default: ${{ github.token }} + updateOnlyUnreleased: + description: | + When allowUpdates is enabled, this will fail the action + if the release it is updating is not a draft or a prerelease. + required: false + default: 'false' + +outputs: + id: + description: 'ID of created/updated release.' + value: ${{ steps.create.outputs.id }} + html-url: + description: 'HTML URL of the release.' + value: ${{ steps.create.outputs.html_url }} + upload-url: + description: 'The URL for uploading assets to the release.' + value: ${{ steps.create.outputs.upload_url }} + +runs: + using: 'composite' + + steps: + - name: Create release + id: create + uses: ncipollo/release-action@e2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 + with: + allowUpdates: ${{ inputs.allowUpdates }} + artifactErrorsFailBuild: ${{ inputs.artifactErrorsFailBuild }} + artifact: ${{ inputs.artifact }} + artifacts: ${{ inputs.artifacts }} + artifactContentType: ${{ inputs.artifactContentType }} + body: ${{ inputs.body }} + bodyFile: ${{ inputs.bodyFile }} + commit: ${{ inputs.commit }} + discussionCategory: ${{ inputs.discussionCategory }} + draft: ${{ inputs.draft }} + generateReleaseNotes: ${{ inputs.generateReleaseNotes }} + makeLatest: ${{ inputs.makeLatest }} + name: ${{ inputs.name }} + omitBody: ${{ inputs.omitBody }} + omitBodyDuringUpdate: ${{ inputs.omitBodyDuringUpdate }} + omitDraftDuringUpdate: ${{ inputs.omitDraftDuringUpdate }} + omitName: ${{ inputs.omitName }} + omitNameDuringUpdate: ${{ inputs.omitNameDuringUpdate }} + omitPrereleaseDuringUpdate: ${{ inputs.omitPrereleaseDuringUpdate }} + owner: ${{ inputs.owner }} + prerelease: ${{ inputs.prerelease }} + removeArtifacts: ${{ inputs.removeArtifacts }} + replacesArtifacts: ${{ inputs.replacesArtifacts }} + repo: ${{ inputs.repo }} + skipIfReleaseExists: ${{ inputs.skipIfReleaseExists }} + tag: ${{ inputs.tag }} + token: ${{ inputs.token }} + updateOnlyUnreleased: ${{ inputs.updateOnlyUnreleased }} \ No newline at end of file diff --git a/actions/release/create/action.yaml b/actions/release/create/action.yaml index 81fd12b7..fac3926e 100644 --- a/actions/release/create/action.yaml +++ b/actions/release/create/action.yaml @@ -91,13 +91,13 @@ outputs: # Release info # id: - description: "ID of created/updated release" + description: 'ID of created/updated release.' value: ${{ steps.create.outputs.id }} html-url: - description: "HTML URL of the release" + description: 'HTML URL of the release'. value: ${{ steps.create.outputs.html_url }} upload-url: - description: The URL for uploading assets to the release. + description: 'The URL for uploading assets to the release.' value: ${{ steps.create.outputs.upload_url }} # @@ -118,7 +118,7 @@ runs: steps: - name: Generate changelog id: changelog - uses: loopwerk/tag-changelog@96adce531513edec860ed73a00d5d4dd11d2efc2 + uses: loopwerk/tag-changelog@941366edb8920e2071eae0449031830984b9f26e with: token: ${{ inputs.token }} exclude_types: ${{ inputs.changelog-exclude-types }} @@ -132,7 +132,7 @@ runs: - name: Create release id: create - uses: ncipollo/release-action@eb05307dcee34deaad054e98128088a30d7980dc + uses: ncipollo/release-action@e2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 with: token: ${{ inputs.token }} name: ${{ inputs.name }}