Could not find the SHA of the previous release
See original GitHub issueWhen I used the following:
sentry_release:
name: Create Sentry release
needs: [ test_js, test_py ]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ env.ORG }}
SENTRY_PROJECT: ${{ env.SENTRY_PROJECT }}
with:
environment: prod
I got the following error:
error: Could not find the SHA of the previous release in the git history. Increase your git clone depth.
It wasn’t clear obvious what to do right away, so I’m wondering if, in the documentation/README, it would be better to change the checkout step to following and add a note about why it’s necessary.
- uses: actions/checkout@v2
with:
fetch-depth: 0
This is what solved it for me. I also wasn’t sure if I should use something other than zero because in Github’s docs it’s not clear what other numbers do.
I’m happy to make a PR for the README if this sounds good or please go ahead and just change it if you want.
Thank you!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:14 (1 by maintainers)
Top Results From Across the Web
Couldn't not find the SHA of the previous release in the git ...
Hey everybody, I'm using Sentry on a repository where we have several branches that upload source maps to Sentry, each time with a...
Read more >Sentry.io ~ All commits associated to all releases
I am getting the Releases tab populated, with releases that correspond to the sha of the commit that triggers each deployment… This is,...
Read more >git - How can I get the SHA number of previous commit?
The command to translate any specifier into a hash ID is git rev-parse . The syntax that means "find the parent commit of...
Read more >2019 SHA-2 Code Signing Support requirement for Windows ...
Any devices without SHA-2 support will not be able to install Windows updates on or after July 2019. To help prepare you for...
Read more >Docker Desktop release notes
For frequently asked questions about Docker Desktop releases, see FAQs ... By default Docker will not create the /var/run/docker.sock symlink on the host ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue, I created a release from a feature branch, then squashed the commits, and then the merge to master created a new release. The release creation on master fails with
Could not find the SHA of the previous release in the git history.
.This case is mentioned in the documentation: https://docs.sentry.io/product/cli/releases/#dealing-with-missing-commits. Probably it would be nice to add the
ignore-missing
flag to the parameters of the action.Hi, I am getting the same error even after adding
fetch-depth: 0
at the new repository. Any solution?