Skip to content

Commit

Permalink
Only publish latest action on push to main
Browse files Browse the repository at this point in the history
  • Loading branch information
codykaup committed Dec 6, 2024
1 parent b444c7e commit 0e39766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/release.mjs
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ async function main() {
await $({ stdout: 'inherit', stderr: 'inherit' })`auto shipit`;

// https://github.blog/changelog/2023-09-13-github-actions-updates-to-github_ref-and-github-ref/
if (process.env.GITHUB_REF === 'refs/heads/main') {
if (process.env.GITHUB_EVENT_NAME === 'push' && process.env.GITHUB_REF === 'refs/heads/main') {
await publishAction('latest');
} else {
console.info('Skipping automatic publish of action-canary.');

0 comments on commit 0e39766

Please sign in to comment.