Skip to content

Commit

Permalink
fix: support prereleases
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Jun 27, 2024
1 parent 7141876 commit 682d669
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"cSpell.words": [
"commitish",
"packagejson",
"prereleases"
],
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
Expand Down
3 changes: 2 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ async function run() {
? {
name: 'act test release',
target_commitish: 'main',
prerelease: true,
}
: github.context.payload.release;
core.info(`current release: ${currentRelease?.name}`);
Expand Down Expand Up @@ -44,7 +45,7 @@ async function run() {
core.info(
`releases: ${releases.map((release) => release.name).join(', ')}`,
);
const lastRelease = releases.find((release) => release.prerelease);
const lastRelease = releases.find((release) => release.prerelease === currentRelease.prerelease);
core.info(`last release: ${lastRelease?.name}`);
const lastReleaseCommit = lastRelease?.target_commitish;

Expand Down

0 comments on commit 682d669

Please sign in to comment.