Skip to content

Commit

Permalink
Merge pull request #102 from bryanpendleton/add-optional-previous-tag
Browse files Browse the repository at this point in the history
Add optional input for previous release tag
  • Loading branch information
amitsingh-007 authored Jun 15, 2024
2 parents 443e71a + 22765f8 commit 1c1bab8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 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
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

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

const oldReleaseTag =
previousTagOverride ?? (await fetchLatestReleaseTag());
const newReleaseTag = getNewReleaseTag(
tagPrefix,
tagTemplate,
Expand Down

0 comments on commit 1c1bab8

Please sign in to comment.