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
7 changes: 7 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ paths:
- '"inputs" section is alias node but mapping node is expected'
- '"paths" section must be sequence node but got alias node with "" tag'
- '"paths-ignore" section must be sequence node but got alias node with "" tag'
.github/workflows/issue.yaml:
ignore:
- 'missing input "app-id" which is required by action "actions/create-github-app-token@v3"'
- 'input "client-id" is not defined in action "actions/create-github-app-token@v3"'
.github/workflows/test.yaml:
ignore:
- 'property ".+" is not defined in object type'
2 changes: 1 addition & 1 deletion .github/example/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: "Draft Release Action"
id: draft
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: "Setup Node 24"
- name: "Setup Node"
uses: actions/setup-node@v6
with:
node-version: 24
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Issue"

on:
issues:
types: [opened]

jobs:
issue:
name: "Issue"
if: ${{ !contains(github.event.issue.labels.*.name, 'enhancement') }}
runs-on: ubuntu-latest
timeout-minutes: 15

permissions:
contents: write
issues: write

steps:
- name: "Checkout"
uses: actions/checkout@v6

- name: "AI Issue"
uses: cssnr/ai-issue-action@v1
with:
model: big-pickle
tail: |
_Response generated by the [AI Issue Action](https://github.com/cssnr/ai-issue-action)._
instructions: |
You are a helpful assistant responding to a GitHub Issue created by user @${{ github.actor }}
in the repository ${{ github.server_url }}/${{ github.repository }}
Provide initial triage and troubleshooting steps, then gather any additional information needed to proceed.
Respond using your general knowledge of GitHub Actions and the following knowledge files:
path: |
action.yml
README.md
21 changes: 8 additions & 13 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Lint"
on:
workflow_dispatch:
push:
branches: [master]
branches: [main, master]
pull_request:

concurrency:
Expand All @@ -26,26 +26,22 @@ jobs:
- name: "Checkout"
uses: actions/checkout@v6

- name: "Setup Node 24"
- name: "Setup Node"
uses: actions/setup-node@v6
with:
node-version: 24

- name: "Install"
- name: "install"
id: install
run: |
npm ci
run: npm ci

- name: "eslint"
id: eslint
if: ${{ !cancelled() }}
run: |
npm run lint
run: npm run lint

- name: "prettier"
if: ${{ !cancelled() }}
run: |
npm run prettier:check
run: npm run prettier:check

- name: "yamllint"
if: ${{ !cancelled() }}
Expand All @@ -61,7 +57,6 @@ jobs:
if: ${{ !cancelled() }}
uses: cssnr/actionlint-action@v1

- name: "Verify action.yml"
- name: "action.yml"
if: ${{ !cancelled() }}
run: |
yq -e '.runs.main | test("^dist/")' action.yml
run: yq -e '.runs.main | test("^dist/")' action.yml
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,29 @@ Want to see more feature? [Request one](https://github.com/cssnr/draft-release-a

## Inputs

| Input | Req. | Default Value | Input Description |
| :--------- | :--: | :----------------- | :----------------------------- |
| semver | - | `prerelease` | Semantaic Version to Incriment |
| identifier | - | `beta` | Prerelease Tag to Append |
| prerelease | - | `true` | Set Draft as Prerelease |
| prefix | - | - | Release Tag Prefix |
| summary | - | `true` | Add Job Summary to Workflow |
| token | - | `github.token` | Only for Use with a PAT |
| Input | Req. | Default Value | Input Description |
| :----------------- | :--: | :----------------- | :---------------------------------- |
| semver | - | `prerelease` | Semantaic Version to Incriment |
| identifier | - | `beta` | Prerelease Tag to Append |
| prerelease | - | `true` | Set Draft as Prerelease |
| prefix | - | - | Release Tag Prefix |
| previous_tag_name | - | - | Previous Tag or SHA for Comparison |
| notes_strip_prefix | - | - | Strip Prefix from Release Notes Tag |
| summary | - | `true` | Add Job Summary to Workflow |
| token | - | `github.token` | Only for Use with a PAT |

**semver:** This is the string passed to `semver.inc()` to determine which version to increment.
For more details, see the [docs](https://github.com/npm/node-semver?tab=readme-ov-file#functions).

**previous_tag_name:** Override the previous tag used as the starting point for generating release notes.
This can be a tag name or a commit SHA. Use this if your release tag was moved after publication
(e.g., by a force-push to a release branch) and the auto-detected tag name no longer produces
correct release notes. Defaults to the latest release tag name.

**notes_strip_prefix:** Strip the prefix from the tag name when generating release notes.
When enabled, the prefix (e.g. `v`) is removed from the tag name before passing it to
`generateReleaseNotes`, so the notes reference the version number without the prefix.

<details><summary>👀 View Example Job Summary</summary>

---
Expand Down Expand Up @@ -123,7 +134,7 @@ jobs:

steps:
- name: 'Checkout'
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: 'Draft Release Action'
id: draft
Expand Down Expand Up @@ -154,7 +165,7 @@ You can view the release notes for each version on the [releases](https://github
The **Major** tag is recommended. It is the most up-to-date and always backwards compatible.
Breaking changes would result in a **Major** version bump. At a minimum you should use a **Minor** tag.

## Support
# Support

If you run into any issues or need help getting started, please do one of the following:

Expand Down Expand Up @@ -184,7 +195,9 @@ Additionally, you can support other [GitHub Actions](https://actions.cssnr.com/)
- [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action?tab=readme-ov-file#readme)
- [Portainer Stack Deploy Action](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)
- [Docker Context Action](https://github.com/cssnr/docker-context-action?tab=readme-ov-file#readme)
- [AI Issue Action](https://github.com/cssnr/ai-issue-action?tab=readme-ov-file#readme)
- [Actions Up Action](https://github.com/cssnr/actions-up-action?tab=readme-ov-file#readme)
- [Webstore Publish Action](https://github.com/cssnr/webstore-publish-action?tab=readme-ov-file#readme)
- [Rhysd Actionlint Action](https://github.com/cssnr/actionlint-action?tab=readme-ov-file#readme)
- [Zensical Action](https://github.com/cssnr/zensical-action?tab=readme-ov-file#readme)
- [VirusTotal Action](https://github.com/cssnr/virustotal-action?tab=readme-ov-file#readme)
Expand Down Expand Up @@ -218,6 +231,7 @@ These actions are not published on the Marketplace, but may be useful.
- [cssnr/push-artifacts-action](https://github.com/cssnr/push-artifacts-action?tab=readme-ov-file#readme) - Sync files to a remote host with rsync.
- [smashedr/update-release-notes-action](https://github.com/smashedr/update-release-notes-action?tab=readme-ov-file#readme) - Update release notes.
- [smashedr/combine-release-notes-action](https://github.com/smashedr/combine-release-notes-action?tab=readme-ov-file#readme) - Combine release notes.
- [smashedr/openai-translate-action](https://github.com/smashedr/openai-translate-action?tab=readme-ov-file#readme) - OpenAI translate action.

---

Expand Down
7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Draft Release Action"
description: "Automatically Draft Releases with Semantic Version Tags"
author: "Shane"

branding:
icon: "repeat"
color: "green"
Expand All @@ -17,7 +18,7 @@ inputs:
# required: false
# default: ""
prerelease:
description: "Mark release as prerelease"
description: "Mark Release as prerelease"
default: "true"
prefix:
description: "Release Tag Prefix"
Expand All @@ -27,6 +28,10 @@ inputs:
token:
description: "GitHub Token"
default: ${{ github.token }}
previous_tag_name:
description: "Previous Tag or SHA for Comparison"
notes_strip_prefix:
description: "Strip Prefix from Release Notes Tag"

outputs:
release:
Expand Down
Loading