Comments (18)
@arminc Great glad you figure it out! And thanks @jetersen :)
from goreleaser-action.
Hi @arminc, do you have a link to your repo?
from goreleaser-action.
@crazy-max Here it is: https://github.com/arminc/k8s-platform-lcm
from goreleaser-action.
@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.
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.
@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.
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.
Hi @jetersen thanks for the tips! We will wait for the validation of this PR ;)
from goreleaser-action.
@jetersen As release-drafter/release-drafter/pull/546 is merged it should be ok now?
from goreleaser-action.
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.
@arminc as I mentioned you will properly need to flip the order.
from goreleaser-action.
Will try that now
from goreleaser-action.
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.
Seems you were successful: https://github.com/arminc/k8s-platform-lcm/releases/tag/0.11.0
from goreleaser-action.
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.
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.
Though not sure how that works with tags now that I think about it 🤔
from goreleaser-action.
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)
- choco not working in actions HOT 1
- goreleaser workflow testing with `--snapshot` on `pull_request` no longer works in V4 HOT 4
- cannot find GoReleaser latest version HOT 18
- The process '/opt/hostedtoolcache/goreleaser-action/1.15.2/x64/goreleaser' failed with exit code 1 HOT 7
- GoReleaser Action not working with `ldflag` HOT 4
- YAML parse error when .goreleaser.yml contains anchor HOT 3
- Env variables not available in post-build hooks HOT 2
- accept goreleaser configuration file as a parameter HOT 3
- How can i specific file into released archive file HOT 2
- latest reports the previous version HOT 1
- Is that possible to publish archive files into the release drafter HOT 1
- Duplicate: Add config file to GitHub action HOT 2
- Github action - error=hook failed: go mod tidy - when code built with Go version 1.21.0 HOT 1
- Question: where are the files built by GoReleaser stored? HOT 3
- Cannot use SSH private key secret as it is being treated as filename HOT 2
- Release Failure with Official Versions using GoReleaser Action v4 HOT 4
- Github: release notes no longer generated HOT 2
- release flag doesn't work `--release-header` HOT 1
- How can I use goreleaser from master? HOT 3
- Is there a way to avoid fetch-depth:0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goreleaser-action.