Giter Site home page Giter Site logo

Comments (18)

crazy-max avatar crazy-max commented on May 20, 2024 1

@arminc Great glad you figure it out! And thanks @jetersen :)

from goreleaser-action.

crazy-max avatar crazy-max commented on May 20, 2024

Hi @arminc, do you have a link to your repo?

from goreleaser-action.

arminc avatar arminc commented on May 20, 2024

@crazy-max Here it is: https://github.com/arminc/k8s-platform-lcm

from goreleaser-action.

crazy-max avatar crazy-max commented on May 20, 2024

@arminc I think it's a release-drafter constraint and you should also apply this step in your release.yml workflow. Something like that:

    - name: Run GoReleaser
      uses: goreleaser/goreleaser-action@v1
      with:
        version: latest
        args: release --rm-dist
      env:
        GITHUB_TOKEN: ${{ secrets.TOKEN_REPO }}
    - name: Publish Release Notes
      uses: release-drafter/release-drafter@v5
      with:
        publish: true
      env:
        GITHUB_TOKEN: ${{ secrets.TOKEN_REPO }}

See also release-drafter/release-drafter#424 (comment)

from goreleaser-action.

arminc avatar arminc commented on May 20, 2024

I have tried it out but it doesn't seem to work out. I will do some more testing or open an issue with release-drafter.
I find it interesting that goreleaser doesn't "recognize" or do anything with the draft. When I was using the travis-ci deploy provider for github it actually "converted or used, not sure which it was" the draft to make it a proper release with binaries included. I am not sure what they were doing that is why I assumed it had to do something with goreleaser.

from goreleaser-action.

arminc avatar arminc commented on May 20, 2024

@crazy-max Thanks for the quick help. As you can see in this issue release-drafter/release-drafter#542 release drafter currently can't do a publish. In my opinion that kind of makes sense. Shouldn't it be goreleasers job to use a draft if it is already there?

from goreleaser-action.

jetersen avatar jetersen commented on May 20, 2024

release-drafter/release-drafter/pull/546 should greatly improve the experience.

You can even write something like this after the PR is merged:

name: Release Drafter

on:
  push:
    branches:
      - master
    tags:
      - v*
    release:
      types: [deleted]

jobs:
  update_release_draft:
    runs-on: ubuntu-latest
    steps:
      - name: Draft Release
        uses: release-drafter/release-drafter@v5
        with:
          publish: ${{ contains(github.ref, "ref/tags") }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

With the following below it will allow you to publish on tags and automatically redraft and republish any deleted releases.

on:
  push:
    tags:
      - v*
    release:
      types: [deleted]

from goreleaser-action.

crazy-max avatar crazy-max commented on May 20, 2024

Hi @jetersen thanks for the tips! We will wait for the validation of this PR ;)

from goreleaser-action.

crazy-max avatar crazy-max commented on May 20, 2024

@jetersen As release-drafter/release-drafter/pull/546 is merged it should be ok now?

from goreleaser-action.

arminc avatar arminc commented on May 20, 2024

The combination still isn't working. What happens now is goreleaser creates the release with the assets, then release-drafter sees there has been a release and then releases a new version which is not what you want.
You can see what happens here: https://github.com/arminc/k8s-platform-lcm/runs/758988731?check_suite_focus=true
with the source code here https://github.com/arminc/k8s-platform-lcm/blob/9f016cbf64fe4213a37163318371aebf5bc765e6/.github/workflows/release.yml

I tried adding version to the release-drafter but it's not picking it up?

Basically what needs to happen is that either goreleaser takes the draft and uses that to release if one is available or release-drafter needs to be able to update release instead of creating a new one, to make this work.

from goreleaser-action.

jetersen avatar jetersen commented on May 20, 2024

@arminc as I mentioned you will properly need to flip the order.

from goreleaser-action.

arminc avatar arminc commented on May 20, 2024

Will try that now

from goreleaser-action.

jetersen avatar jetersen commented on May 20, 2024

though looking into goreleaser it would look like it will create the release.

However we could in release-drafter easily fox so that it would not bump the version if version is specified. I think this is done because the "last release" is using same version and we automatically bump the version.

from goreleaser-action.

jetersen avatar jetersen commented on May 20, 2024

Seems you were successful: https://github.com/arminc/k8s-platform-lcm/releases/tag/0.11.0

from goreleaser-action.

arminc avatar arminc commented on May 20, 2024

Yes, with realease-drafter having created a draft 0.11.0, then a release happens where release-drafter actually creates the 0.11.0 release (only with the publish flag, not forcing the version). Then gorelease runs and adds the assets. So it seems it works now :)

from goreleaser-action.

jetersen avatar jetersen commented on May 20, 2024

You properly want to use $RESOLVED_VERSION so you can use labels to bump the version number.
See the use case here: https://github.com/release-drafter/release-drafter/blob/master/.github/release-drafter.yml

  
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
categories:
  - title: '🚀 Features'
    labels:
      - 'feature'
      - 'enhancement'
  - title: '🐛 Bug Fixes'
    labels:
      - 'fix'
      - 'bugfix'
      - 'bug'
  - title: '🧰 Maintenance'
    labels: 
      - 'chore'
      - 'documentation'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
template: |
  ## Changes
  $CHANGES

from goreleaser-action.

jetersen avatar jetersen commented on May 20, 2024

Though not sure how that works with tags now that I think about it 🤔

from goreleaser-action.

arminc avatar arminc commented on May 20, 2024

I will need to look into that, haven't read about the difference NEXT_MINOR_VERSION and RESOLVED_VERSION.
Having said that, @crazy-max this issue is solved

from goreleaser-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.