From daf6bc3dfaee1e6a3e6a160810abc84fd044abff Mon Sep 17 00:00:00 2001 From: Josh Wilson Date: Tue, 21 Jul 2020 17:21:12 +0200 Subject: [PATCH] fix(tags): push tags after initial push attempt Prevents tags being created when we cannot push to a branch for some reason --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 3d7f984..85ef51d 100644 --- a/index.js +++ b/index.js @@ -80,6 +80,10 @@ const bump = async () => { // update branch with changes core.debug(`Attempting to push to ${branch}`); + // first push without tags, in case this fails for some reason + await exec.exec(`git push "https://${actor}:${token}@github.com/${repo}" HEAD:${branch}`); + + // then push with tags await exec.exec(`git push "https://${actor}:${token}@github.com/${repo}" HEAD:${branch} --tags`); } catch (error) {