Skip to content

Commit

Permalink
Add optional input for previous release tag
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanpendleton committed May 22, 2024
1 parent 517026f commit f4ee804
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ inputs:
tag_template:
description: 'Template format based in which release tag is generated'
required: true
previous_tag:
description: 'Explicitly set the previous release tag'
required: false


runs:
using: 'node20'
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const generateNextReleaseTag = async (): Promise<void> => {
try {
const tagPrefix = getInput('tag_prefix');
const tagTemplate = getInput('tag_template');
const oldReleaseTag = await fetchLatestReleaseTag();
const oldReleaseTag = getInput('previous_tag') || await fetchLatestReleaseTag();

Check failure on line 9 in src/index.ts

View workflow job for this annotation

GitHub Actions / Verify

Replace `·getInput('previous_tag')·||·await·fetchLatestReleaseTag(` with `⏎······getInput('previous_tag')·||·(await·fetchLatestReleaseTag()`
const newReleaseTag = getNewReleaseTag(
tagPrefix,
tagTemplate,
Expand Down

0 comments on commit f4ee804

Please sign in to comment.