-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tag project-x.y.z exists locally but has not been pushed #561
Comments
I'm also getting this error, my error is here: https://github.com/Samelogic/microsurveys/runs/7366584884?check_suite_focus=true |
Well, I think I fixed this bug multiple times without fixing it finally... 😱 |
We are experiencing the same issue. Seems like the Github action tries to create the same tag for Github release.
|
Any news here? |
@samuelfernandez setting "push": true in version scheme resolved the problem for us. The error happened because the tag was not pushed before creating Github Release. You can see it from the error message. Make sure you removed all unwanted tags locally and remotely and run git fetch. I can confirm that everything now works and @edbzn can close it. |
@AndriiTsok that was a fast answer, thanks so much! Would it be useful to explain that in the readme and config examples for github builder? |
no idea if this works but |
I am getting a similar error after successful deployment "version": {
"executor": "@jscutlery/semver:version",
"options": {
"preset": "conventional",
"baseBranch": "main",
"tagPrefix": "release/${projectName}@",
"push": true,
"commitMessageFormat": "release(${projectName}): version ${version} [skip ci]",
"postTargets": ["my-project:deploy", "my-project:github"],
"syncVersions": false,
"trackDeps": true,
"skipCommitTypes": ["docs", "ci", "release"]
}
},
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"target": "main",
"tag": "${tag}",
"notes": "${notes}"
}
},
"deploy": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "restricted",
"buildTarget": "production",
"registry": "https://npm.pkg.github.com/"
}
}
|
Finally i found the problem causing this error: Here is my working circleci config.yml version: 2.1
orbs:
node: circleci/[email protected]
# - - - - - - - -
# executors
# - - - - - - - -
executors:
node-docker:
docker:
- image: cimg/node:18.15.0
# - - - - - - - -
# commands
# - - - - - - - -
commands:
workspace-setup:
steps:
- checkout
- attach_workspace:
at: .
login-to-npm-registry:
steps:
- run:
name: 'login to npm registry'
command: echo "//npm.pkg.github.com/:_authToken=$GITHUB_NPM_TOKEN" >> ~/.npmrc
git-login:
steps:
- run:
name: git login
command: |
git config --global user.email "[email protected]"
git config --global user.name "xxx"
install-linux-brew:
steps:
- run:
name: Install and set Linuxbrew
command: |
sudo apt-get install build-essential curl file git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/:$PATH"' >> $BASH_ENV
echo 'export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"' >> $BASH_ENV
echo 'export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"' >> $BASH_ENV
# - - - - - - - -
# jobs
# - - - - - - - -
jobs:
npm-init:
executor: node-docker
steps:
- checkout
- node/install-packages:
app-dir: '.'
with-cache: false
- persist_to_workspace:
root: .
paths:
- .npm/
- node_modules/
unit-test:
executor: node-docker
steps:
- workspace-setup
- run:
name: Run Unit Tests
command: npx nx run my-project:test --configuration=ci
publish-package:
executor: node-docker
steps:
- workspace-setup
- login-to-npm-registry
- git-login
- install-linux-brew
- run:
name: Install Github CLI
command: brew install gh
- run:
name: publish package
command: npx nx run my-project:version
publish-beta-package-dev:
executor: node-docker
steps:
- workspace-setup
- login-to-npm-registry
- git-login
- run:
name: publish beta package dev
command: npx nx run my-project:beta-release
# - - - - - - - -
# workflows
# - - - - - - - -
workflows:
version: 2
verify:
jobs:
- npm-init
- unit-test:
requires:
- npm-init
context:
- NPM
- publish-package:
filters:
branches:
only:
- main
requires:
- unit-test
context:
- NPM
- publish-beta-package-dev:
filters:
branches:
only:
- dev
requires:
- unit-test
context:
- NPM |
@gabsmprocha This error means your tags were not pushed to the remote. It does not automatically goes with git push. First, you have to create your tag with Then your Github will be in sync with your remote tags and the semver will be able to infer your correct version. |
well, GitHub CLI is preinstalled on all GitHub-hosted runners: |
Hi guys,
I'm having the same error similar to this issue: #461
error: tag project-x.y.z exists locally but has not been pushed
The text was updated successfully, but these errors were encountered: