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

Unable to release using tags #60

Closed
aabouzaid opened this issue Nov 8, 2020 · 2 comments
Closed

Unable to release using tags #60

aabouzaid opened this issue Nov 8, 2020 · 2 comments

Comments

@aabouzaid
Copy link

I'd like to release charts based on custom git tags (e.g. v1.0.0) but looks like the only supported method by chart-releaser-action is a release from a branch.

Let's assume we have a main branch, when I create a tag out of it, I get this in the chart-releaser-action step:

Looking up latest tag...
Discovering changed charts since 'v1.0.0'...
Nothing to do. No chart changes detected.

That's because, in cr.sh script, it checks the tag on the commit, and since the latest tag is actually the latest, it shows no changes.

Maybe providing an option to ignore a list of tags could be a good solution.

Please note, this is not only about using tags to release but also in case a tag is pushed to the repo it will miss up the whole release process.

@alejandrogr
Copy link

Hello!

We are having the exact same issue, 1 year later :D Is this something that is going to be fixed?

We have a workaround directly in the workflow but it would be nice to be able to use the releaser-action to make releases on tags.

This is our workarround:

      - name: Chart releaser
        run: |
          # Download chart releaser
          curl -sSLo cr.tar.gz "https://github.com/helm/chart-releaser/releases/download/v1.2.1/chart-releaser_1.2.1_linux_amd64.tar.gz"
          tar -xzf cr.tar.gz
          rm -f cr.tar.gz
          repo=$(cut -d '/' -f 2 <<< "$GITHUB_REPOSITORY")
          owner=$(cut -d '/' -f 1 <<< "$GITHUB_REPOSITORY")
          exists=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/{{repo_name}}$repo/releases/tags/$repo-${{ steps.fix_tag.outputs.tag }} -w %{http_code} -o /dev/null)
          if [[ $exists != "200" ]]; then
            echo "Creating release..."
            # package chart
            ./cr package ${{ inputs.chart_path }}/$repo
            # upload chart to github releases
            ./cr upload \
                --owner "$owner" \
                --git-repo "$repo" \
                --token "${{ secrets.GITHUB_TOKEN }}"
            # Update index and push to github pages
            ./cr index \
                --owner "$owner" \
                --git-repo "$repo" \
                --token "${{ secrets.GITHUB_TOKEN }}" \
                --charts-repo ${{ inputs.chart_url }} \
                --push
          else
            echo "Release already exists"
          fi

@cpanato
Copy link
Member

cpanato commented Mar 24, 2023

fixed in #96

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

No branches or pull requests

3 participants