Skip to content
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

No previous release found on a project which has previous releases and tags #2486

Open
andersfischernielsen opened this issue Jan 16, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@andersfischernielsen
Copy link

I'm trying to set up Auto as our release tool. I've written a GitHub workflow which does the following:

name: Release

on:
  push:
    branches:
      - main

jobs:
  changelog:
    name: Release
    runs-on: ubuntu-latest
    if: "${{ !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci') }}"
    needs:
      - deploy-device-api
      - deploy-brisk-platform
    permissions:
      issues: read
      pull-requests: read
      contents: write
      packages: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Prepare
        run: git fetch --unshallow --tags

      - name: Setup Bun
        uses: oven-sh/setup-bun@v2

      - name: Generate release
        run: bunx auto shipit
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Looking at the -vv output for shipit or release I see the following:

ℹ  info      No previous release found, using 0.0.0 as previous version.
ℹ  info      Using latest release as previous version

The project has several releases on GitHub: v0.0.0 and v.0.0.1. I also tried tagging and naming these releases 0.0.0 and 0.0.1 just to understand the behavior of Auto.

I've tried setting the version in package.json to both 0.0.0 and v0.0.0.

I've added the minor label to a previous PR merged on the branch and auto version shows minor as expected. The CHANGELOG is also generated and shown as expected, but then Auto exits with:

⚠  warning   Nothing released to Github. Version to be released is the same as the latest release on Github: v0.0.1

I've tried running the app locally with a token with the same permissions as the GitHub workflow and with a GitHub PAT which has all permissions set to read and write, with no luck.

My package.json has the following "auto" section:

{
  "auto": {
    "plugins": [],
    "author": "Auto <software@reshapebiotech.com>"
  }
}

No matter what I try, Auto refuses to detect the previous releases and/or release a new release.

To Reproduce

  • Run auto shipit -vv or auto release -vv

Expected behavior

Auto releases a minor version bump.

Screenshots

Image

Environment information:

Environment Information:

"auto" version: v11.3.0
"git"  version: v2.39.5 (Apple Git-154)
"node" version: v23.5.0

Project Information:

✔ Repository:      reshapebiotech/brisk
✔ Author Name:     Anders Fischer-Nielsen
✔ Author Email:    nope@nothanks.com
✔ Current Version: v0.0.1
✔ Latest Release:  v0.0.1

✖ Labels configured on GitHub project (Try running "auto create-labels")

GitHub Token Information:

✔ Token:            [Token starting with ghp_]
✔ Repo Permission:  admin
✔ User:             andersfischernielsen
✔ API:
✔ Enabled Scopes:   admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, copilot, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages
✔ Rate Limit:       4778/5000
@andersfischernielsen andersfischernielsen added the bug Something isn't working label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant