Giter Site home page Giter Site logo

Comments (33)

TylerHelmuth avatar TylerHelmuth commented on July 17, 2024 1

it required a .goreleaser file in the root of the project

I am curious to see this solution. How does it interact with the distro-specific .goreleaser files? Go ahead an open a PR.

from opentelemetry-collector-releases.

mx-psi avatar mx-psi commented on July 17, 2024 1

Oh, looks like that should be #504, I had a look but missed it 😅 no need to tag me now!

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024 1

Hello @mx-psi , @TylerHelmuth after about a week of battling and reading most of the goreleaser docs, here's what I've found. Having the .goreleaser file in the root directory doesn't work for the header release. They make mention of goreleaser release --release-notes command but it didn't work for templated text and there was no mention of how to use it for templated text so I experimented and searched and found this command goreleaser release --release-header-tmpl=file. It allows use of a markdown file, and here's a test of it, please check it out and let me know : https://github.com/Enzujp/sample-releases/actions/runs/8659835103/job/23746516462

from opentelemetry-collector-releases.

TylerHelmuth avatar TylerHelmuth commented on July 17, 2024 1

@Enzujp perfect! can you do one more test where 2 release jobs run with that argument (mimicking how Core, Contrib, and k8s all release at the same time in this repo)? I want to make sure they don't clash

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024 1

@TylerHelmuth , release-template.md it has to be a markdown file. I'll do that.

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

Hello @mx-psi , @jpkrohling if this is still unattended, I'd love to work on it!

from opentelemetry-collector-releases.

mx-psi avatar mx-psi commented on July 17, 2024

@Enzujp assigned to you!

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

@mx-psi Thank you, I'd get on it !

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

hello @mx-psi , while working on this, I discovered we can only automate using GoReleaser Pro, the feature that allows us link the change logs for core and contrib require the GoReleaser Pro and I don't have access to that. Is there perhaps another way to go about this ?

from opentelemetry-collector-releases.

TylerHelmuth avatar TylerHelmuth commented on July 17, 2024

@Enzujp correct, we use goreleaser pro. Seems we've run into #497.

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

Aw shucks, I was looking forward to working on this @TylerHelmuth

from opentelemetry-collector-releases.

mx-psi avatar mx-psi commented on July 17, 2024

@Enzujp We do have goreleaser Pro. An alternative is to use the CLI tool from Github, which has the gh release edit subcommand. Yet another alternative is to use a dedicated Github Action for this. Any of these options seems acceptable to me.

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

@mx-psi , Thank you very much I'd get on it.

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

Hello there @mx-psi, I finally got this to work as expected, it required a .goreleaser file in the root of the project. It does print the custom message and link to change logs from core and contrib; automatically updating the hyperlinks with each version released.
If this is acceptable, I'd like to create a pull request.

from opentelemetry-collector-releases.

mx-psi avatar mx-psi commented on July 17, 2024

Agreed, let's see a PR and discuss it there :)

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

Hello @mx-psi , welcome back! This already happened, would you like for me to tag you to it ?

from opentelemetry-collector-releases.

TylerHelmuth avatar TylerHelmuth commented on July 17, 2024

Adding the .goreleaser.yaml to the root of the directory did not work during the v0.97.0 release: https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/v0.97.0

from opentelemetry-collector-releases.

TylerHelmuth avatar TylerHelmuth commented on July 17, 2024

I have manually updated the release notes to include the desired header.

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

I'll go through the goreleaser docs and find a better way to do it. I'd find a fix.

from opentelemetry-collector-releases.

TylerHelmuth avatar TylerHelmuth commented on July 17, 2024

It might be easiest to use gh cli somehow. Also maybe try using release note templates.

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

@TylerHelmuth , I figured out what was missing! The repository specification is what's missing.

goreleaser_screenshot

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

Here's a sample of its usage and there's a release to show too : https://github.com/KenanBek/dbui/blob/main/.goreleaser.yml

from opentelemetry-collector-releases.

TylerHelmuth avatar TylerHelmuth commented on July 17, 2024

I am still concerned that the jobs specify a workdir that is different than root. I noticed after the v0.97.0 release that I had missed that your example repo does not do that: https://github.com/Enzujp/sample-releases/blob/ddcbd7645567cf99ed6b818f3c040c709ca775dc/.github/workflows/goreleaser.yaml#L36-L43

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

I'll make adjustments to that, and test the code to be sure it works as it should this time.

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

Without the root as the working directory, this is the only other way to do it.

from opentelemetry-collector-releases.

TylerHelmuth avatar TylerHelmuth commented on July 17, 2024

@Enzujp this looks promising. What happens if instead of a separate step you pass --release-header-tmpl=release.md as an argument like this:

- name: Run GoReleaser
  uses: goreleaser/goreleaser-action@v5
  with: 
    distribution: goreleaser
    version: latest
    workdir: distributions/${{ inputs.distribution }}
    args: release --clean --release-header-tmpl=release.md
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

Oh that's brilliant @TylerHelmuth ! It worked!
Here's the link : https://github.com/Enzujp/sample-releases/actions/runs/8701172920/job/23862650984

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

@TylerHelmuth I'm a little confused as to how I'm to go about this, please explain a little further.

from opentelemetry-collector-releases.

TylerHelmuth avatar TylerHelmuth commented on July 17, 2024

Can you update your release workflow with a second release job like

  goreleaser-2:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Set up Go
        uses: actions/setup-go@v4


      - name: Run GoReleaser
        uses: goreleaser/goreleaser-action@v5
        with: 
          distribution: goreleaser
          version: latest
          workdir: distributions/otelcol-contrib
          args: release --clean --release-header-tmpl=../release.md
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

Done @TylerHelmuth. Here's the link to the test : https://github.com/Enzujp/sample-releases/actions/runs/8711833942/job/23896805424

from opentelemetry-collector-releases.

TylerHelmuth avatar TylerHelmuth commented on July 17, 2024

Awesome, let's implement this option

from opentelemetry-collector-releases.

Enzujp avatar Enzujp commented on July 17, 2024

@TylerHelmuth Got it. I only need include this in the release section right? Like this

- uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
       
 with:
          distribution: goreleaser-pro
          version: latest
          workdir: distributions/${{ inputs.distribution }}
          args: continue --merge --timeout 2h --release-header-tmpl=../release.md
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          COSIGN_YES: true
          GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

from opentelemetry-collector-releases.

TylerHelmuth avatar TylerHelmuth commented on July 17, 2024

Correct, and add the template file. It should live in .github and be named something like release-template.yaml

from opentelemetry-collector-releases.

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.