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

picked incorrect tag for release #238

Closed
theganyo opened this issue Aug 26, 2020 · 4 comments · Fixed by #239
Closed

picked incorrect tag for release #238

theganyo opened this issue Aug 26, 2020 · 4 comments · Fixed by #239

Comments

@theganyo
Copy link

Using the following config:

name: Release

on:
  push:
    tags:
      - 'v[0-9]+.[0-9]+.[0-9]+*' # semver v1.0.0-beta.2

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      -
        name: Set up Go
        uses: actions/setup-go@v2
        with:
          go-version: 1.14
      -
        name: Run GoReleaser
        uses: goreleaser/goreleaser-action@v2
        with:
          version: latest
          args: release --rm-dist
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

goreleaser failed to use the correct tag.

  1. I had tagged a v1.1.0-rc.1 and goreleaser created a proper release.
  2. I tagged v1.1.0 on the same commit... and goreleaser re-created the v1.1.0-rc.1 release.

My expectation was that it create a new release on the v1.1.0 label.

@crazy-max
Copy link
Member

@theganyo Do you have a link to your repo please?

@theganyo
Copy link
Author

Sure. It was on this repo: https://github.com/apigee/apigee-remote-service-golib

@crazy-max
Copy link
Member

@theganyo goreleaser/goreleaser-action@check-github-ref should fix your issue. See #239.

@theganyo
Copy link
Author

@crazy-max Great news! Thanks!

crazy-max added a commit that referenced this issue Aug 27, 2020
…ag (#238)

* fix: Use GITHUB_REF to retrieve tag before checking the most recent tag (#238)

* Update tests

* Check also tags sorted by creatordate for the current GITHUB_SHA

* fix: Check tags length

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants