{"id":31836276,"url":"https://github.com/lfreleng-actions/draft-release-promote-action","last_synced_at":"2026-02-18T18:31:18.767Z","repository":{"id":289192989,"uuid":"967895278","full_name":"lfreleng-actions/draft-release-promote-action","owner":"lfreleng-actions","description":"Promotes a draft release to full release status","archived":false,"fork":false,"pushed_at":"2026-02-09T23:29:54.000Z","size":168,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-10T03:59:59.290Z","etag":null,"topics":["draft","promote","publish","release","releasing"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lfreleng-actions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-17T07:05:05.000Z","updated_at":"2026-01-27T10:51:40.000Z","dependencies_parsed_at":"2025-04-22T04:12:57.727Z","dependency_job_id":"f4d1aa97-fd3e-4b78-9155-3f0fc0872c92","html_url":"https://github.com/lfreleng-actions/draft-release-promote-action","commit_stats":null,"previous_names":["lfreleng-actions/draft-release-promote-action"],"tags_count":5,"template":false,"template_full_name":"lfreleng-actions/actions-template","purl":"pkg:github/lfreleng-actions/draft-release-promote-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfreleng-actions%2Fdraft-release-promote-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfreleng-actions%2Fdraft-release-promote-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfreleng-actions%2Fdraft-release-promote-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfreleng-actions%2Fdraft-release-promote-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lfreleng-actions","download_url":"https://codeload.github.com/lfreleng-actions/draft-release-promote-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfreleng-actions%2Fdraft-release-promote-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29589441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T16:55:40.614Z","status":"ssl_error","status_checked_at":"2026-02-18T16:55:37.558Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["draft","promote","publish","release","releasing"],"created_at":"2025-10-12T01:29:01.810Z","updated_at":"2026-02-18T18:31:18.762Z","avatar_url":"https://github.com/lfreleng-actions.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n# SPDX-License-Identifier: Apache-2.0\n# SPDX-FileCopyrightText: 2025 The Linux Foundation\n--\u003e\n\n# ⏫ Promote Draft Release\n\nPromotes a draft GitHub release to a full release.\n\n## draft-release-promote-action\n\n## Usage Example\n\n\u003c!-- markdownlint-disable MD046 --\u003e\n\n```yaml\nsteps:\n  - name: 'Promote Draft Release'\n    uses: lfreleng-actions/draft-release-promote-action@main\n    with:\n      TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n\u003c!-- markdownlint-enable MD046 --\u003e\n\n## Token Permissions\n\nThe token needs the following permissions:\n\n`contents: write`\n\n## Inputs\n\n\u003c!-- markdownlint-disable MD013 --\u003e\n\n| Variable Name | Required | Description                                          |\n| ------------- | -------- | ---------------------------------------------------- |\n| token         | True     | GitHub token with relevant permissions               |\n| latest        | False    | Mark as the latest release                           |\n| tag           | False    | Tag of draft release to promote                      |\n| name          | False    | Name of draft release to promote                     |\n| sort_by       | False    | Sort by this field (see note below for valid options |\n| sort_reverse  | False    | Reverse the sort order of results                    |\n| dry-run       | False    | Perform validation without promoting the release     |\n\n\u003c!-- markdownlint-enable MD013 --\u003e\n\nValid options for sort_by input:\n\n- createdAt\n- isDraft\n- isLatest\n- isPrerelease\n- name\n- publishedAt\n- tagName\n\n## Behavior\n\n### Dry Run Mode\n\nWhen `dry-run` is `true`, the action will:\n\n- Perform all validation logic\n- Select the matching draft release\n- Display warnings for non-matching draft releases\n- **Skip the actual promotion** of the release\n- Output what would happen\n\nExample usage:\n\n```yaml\n- name: 'Promote draft release (dry-run)'\n  uses: lfreleng-actions/draft-release-promote-action@main\n  with:\n    token: \"${{ secrets.GITHUB_TOKEN }}\"\n    tag: \"${{ github.ref_name }}\"\n    latest: true\n    dry-run: true\n```\n\nExample dry-run output:\n\n```text\nDry-run: Would promote v0.1.3 and set as latest\n```\n\nThe GitHub Step Summary will show:\n\n```markdown\n## 🔍 Dry Run: v0.1.3\nWould promote to latest release\n```\n\n### Draft Releases\n\nWhen more than one draft release exists in the repository:\n\n- The action will promote the draft release matching the specified `tag` (or `name`)\n- The action warns about other non-matching draft releases\n- The warning appears in both the console output and GitHub Actions step summary\n\nExample warning annotation:\n\n```text\n::warning::Non-matching draft releases found: v0.1.0\n```\n\nWhen more than one non-matching draft exists, the action comma-separates them:\n\n```text\n::warning::Non-matching draft releases found: v0.1.0, v0.9.0\n```\n\n### Error Handling\n\nThe action provides clear error messages for common scenarios:\n\n- GitHub token not provided (required for authentication)\n- `jq` command not found (required for JSON processing)\n- Invalid `sort_by` field value\n- No draft releases found in the repository\n- No draft release matches the specified tag or name\n\n## Implementation Details\n\nUses the GitHub CLI command:\n\n`gh release list --json createdAt,isDraft,isLatest,isPrerelease,name,publishedAt,tagName`\n\nExample output:\n\n```json\n[\n  {\n    \"createdAt\": \"2025-04-18T05:19:03Z\",\n    \"isDraft\": true,\n    \"isLatest\": false,\n    \"isPrerelease\": false,\n    \"name\": \"\",\n    \"publishedAt\": \"0001-01-01T00:00:00Z\",\n    \"tagName\": \"v9.9.3\"\n  },\n  {\n    \"createdAt\": \"2025-04-17T11:45:14Z\",\n    \"isDraft\": false,\n    \"isLatest\": false,\n    \"isPrerelease\": false,\n    \"name\": \"\",\n    \"publishedAt\": \"2025-04-19T05:00:04Z\",\n    \"tagName\": \"v9.9.0\"\n  }\n]\n```\n\nThis is then passed through JQ commands to sort and filter the results.\n\nSome examples:\n\n`jq \"[.[] | select(.isDraft==true)]\"`\n\n`jq \"sort_by(.tagName)\"`\n\n`jq '. | reverse'`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfreleng-actions%2Fdraft-release-promote-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfreleng-actions%2Fdraft-release-promote-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfreleng-actions%2Fdraft-release-promote-action/lists"}