Skip to content

Commit

Permalink
Push only specified tag (#5)
Browse files Browse the repository at this point in the history
Running `git push --force --tags` will push all tags in local repo. If your repository have multiple tags, this may cause problem

Instead run specifically push for the tag that is being updated with `git push --force origin ${tagName}`
  • Loading branch information
DocX committed May 6, 2020
1 parent 3790de7 commit f613784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function run() {
else await lightweightTag(tagName)

info('Pushing updated tag to repo...')
return await exec('git push --force --tags')
return await exec(`git push --force origin ${tagName}`)
} else setFailed('Missing `GITHUB_TOKEN` environment variable')
} catch (error) {
setFailed(error instanceof Error ? error.message : error)
Expand Down

0 comments on commit f613784

Please sign in to comment.