Open garrettg123 opened 1 year ago
same for me
Also encountering this while using actions/checkout@v3
with and withoutfetch-depth: 0
,
is there way to enable debug logs for this action, couldn't find it in the docs.
Anyone solved this? Running into the same issue with pretty standard workflow:
Error: Command failed: /action-release/dist/sentry-cli releases set-commits sentry-release --auto
error: No commits found. Change commits range, initial depth or use --ignore-empty to allow empty patch sets.
Sometimes it passses/ sometime it fails. I am getting pretty annoyed by "releases" in sentry.
Errors are amazing in sentry, everything works just like that out of the box. But these releases man, I am couple of hours already in and still doesn't work as I would like. Bad experience.
This action didn't work for me properly and I switched over to using sentry-cli directly.
# createSentryRelease.sh
# Retrieve package version and name from package.json
VERSION=$(node -p "require('./package.json').version")
PROJECT_NAME=$(node -p "require('./package.json').name")
printf "Will use $PROJECT_NAME@$VERSION\n"
# Replace with your organization slug
ORGANIZATION_SLUG="xxx"
# Accept environment as an argument with fallback to 'development'
ENVIRONMENT="${1:-development}"
# Create a new release with package name
RELEASE_NAME="$PROJECT_NAME@$VERSION"
# Create a new release
sentry-cli releases new "$RELEASE_NAME" --project "$PROJECT_NAME" --org "$ORGANIZATION_SLUG"
# Associate commits with the release, ignoring missing commits
sentry-cli releases set-commits "$RELEASE_NAME" --auto --ignore-missing --org "$ORGANIZATION_SLUG"
# Finalize the release
sentry-cli releases finalize "$RELEASE_NAME" --org "$ORGANIZATION_SLUG"
# Associate deployment with the release
sentry-cli releases deploys "$RELEASE_NAME" new -e "$ENVIRONMENT" --org "$ORGANIZATION_SLUG"
Then in my Github Actions, there is a step
- name: Create Sentry release
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
npm install -g @sentry/cli@2.18.1
sentry-cli login --auth-token $SENTRY_AUTH_TOKEN
chmod +x createSentryRelease.sh
./createSentryRelease.sh $ENV
$ENV
For those still struggling with this, the solution is super simple but obscure:
Sentry > Settings > Integrations > GitHub
Configurations tab: create a configuration if your org isn't listed
Add the repository you are creating your release from
Re-run your job and it should succeed
Credit to https://github.com/getsentry/action-release/issues/75#issuecomment-1083730665 and https://github.com/getsentry/action-release/issues/75#issuecomment-1229146323
I believe Github integration is a paid plan feature, so if you are on a free plan above solution might not work for you.
Thanks @SpencerKaiser, worked for me 👍 FYI for anyone reading this, I'm on the free plan and was able to integrate with my Github repo.
Solution
For those still struggling with this, the solution is super simple but obscure:
- Sentry > Settings > Integrations > GitHub
- Configurations tab: create a configuration if your org isn't listed
- Add the repository you are creating your release from
- Re-run your job and it should succeed
Credit to #75 (comment) and #75 (comment)
Thank you @SpencerKaiser, your solution also worked for me.
Github Sentry Action Release Bug Report
Environment
How do you use this action? standard
Which version of the action? v1
Steps to Reproduce
Expected Result
Sentry release success
Actual Result
No commits found. Change commits range, initial depth or use --ignore-empty to allow empty patch sets.