Comments (8)
Does it all happen in the same branch? I see requireBranch: release-job
.
Also see https://github.com/release-it/release-it/blob/main/docs/git.md#use-all-refs-to-determine-latest-tag
from release-it.
While I was developing the workflow I had removed the requireBranch
setting. Now that I am getting closer to the point I can go a release I have added requireBranch
back in to simulate what it will be like when I can update the setting for requiring the release
branch.
The job runs that I referenced above in the description are running on the release-job
branch. I just checked the checkout action of the failed job and see:
Checking out the ref
/usr/bin/git checkout --progress --force -B release-job refs/remotes/origin/release-job
Switched to a new branch 'release-job'
branch 'release-job' set up to track 'origin/release-job'.
So to me that does indicate that the job is happening on the release-job
branch.
Interesting..... I was just looking at the output above to say "yes, even the log shows it on the release-job branch", but I found something I did not expect.
Run git log --graph --all --pretty=format:'%h - (%cr) %s%d' --abbrev-commit --date=relative
* 7fecbef - (43 seconds ago) chore(release): 3.0.0 (tag: v3.0.0)
* e98269c - (81 seconds ago) fixup (HEAD -> release-job, origin/release-job)
* d63b3be - (3 minutes ago) fixup
* d73ee89 - (5 minutes ago) fixup
While HEAD
is on release-job
, the actual v3.0.0
is on the commit ahead of the branch. At the end of the create-release
job I also printed out the git log to verify that the commits occurred. On that output it shows the tag and the branch on the same commit. Does release-it
not push the branch back to the repo? It appears that it does indirectly by pushing the tag, but without pushing the branch the HEAD
of the branch does not get updated. Is this expected or am I not understanding something?
from release-it.
The default behavior is a git push --follow-tags
, as is the logs show. The exact commands are logged.
If extra arguments are required they can be added (see the same docs page).
from release-it.
OK, I am still reviewing the git page document you sent.
I agree that given your last comment and what I am seeing in the job output that it does appear that release-it
is pushing the branch back to the repo. Especially since I see that origin/release-job
has been updated to the latest HEAD
and the tag commit.
I am still trying to understand all the actions that release-it
is taking and that I am not mis-understanding the process that release-it
is expecting to follow. Through this discussion I am starting to think that release-it
is doing the right things. You are not seeing anything that I am doing (either command or config file) that is an issue and believe that release-it
is operating as expected?
I am assuming that you are going to respond with "every thing is working as expected" to the above question. Which tells me and given where I am finding HEAD
pointing in the 3rd job, that there is a caching issue when the repo is checked out for the 3rd job. Is that your impression also?
Thanks.
from release-it.
The thing is, there isn't that much more I can say, since you can exactly see what release-it does. Hopefully it provides enough flexibility to make it do whatever you want.
For instance, a git push
may or may not push to the correct remote url. I can't know/see that.
This reminds me: you can also use --debug
which reveals more verbose output such as the output of the commands.
from release-it.
Scratch that, mixing up tooling here. I meant prefix the command with NODE_DEBUG=release-it:*
.
from release-it.
OK. I will give that a try and see if I find more info to confirm my suspicions.
My release process is quite simple (at least I think so). I will cut a PR to the release
branch with the changes to go into the release. Approval/merging of the PR will kick off the workflow which will create the release (working), create the packaging as artifacts (working, but outside the scope of release-it
), and then attach the artifacts to the release.
I have been able to get all of this working by manually executing release-it
and trying to be as close as I can be to the CI environment. So this fact and this discussion is convincing me that release-it
is correct and working as I expected.
Thank you for your help today.
from release-it.
In case anyone else finds this issue and has problems like the one described, I found that I needed to execute a git pull
immediately after the actions/checkout
step. Once this was done the HEAD
of the branch was on the proper commit.
from release-it.
Related Issues (20)
- Discussion - Pre-releases changelog duplicating header for pre-releases header HOT 3
- NPM IP package vulnerable to Server-Side Request Forgery (SSRF) attacks HOT 3
- Bug - Issue with github comment on resolved items HOT 10
- [ERROR] GitLab CI error on NPM notice HOT 2
- Cannot understand how release verison is calculated HOT 2
- Hook for after changelog is written to CHANGELOG.md? HOT 2
- Bug: Error when rolling back git tag release suppresses original error
- Error Invalid version HOT 7
- beta and alpha releases do not work HOT 7
- When publishing an npm package, when the publishPath option is set, isCollaborator should detect package.json under publishPath instead of the current directory. HOT 2
- Wrong documentation related to running a custom Git Push command HOT 4
- How can I change method of releasing (from "Release 0.0.1" to "v0.0.1") ? HOT 3
- How can I change parametrs from "Release 0.0.0" to "v0.0.0" after writing release-it, and publishing into repository ? HOT 7
- Return different message when requireCommitsFail is false HOT 1
- Commits to one dir generate release of another. HOT 2
- Programatic Usage: Release-Version Premature Exit HOT 1
- Can't quite get auto-changelog right in github release notes. githubRelease runs before git commit/tag HOT 8
- Can't upload github release assets without rewriting release's changelog HOT 2
- Error 405 (Method Not Allowed) when creating Gitlab release (Gitlab self-hosted) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from release-it.