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

fix: goreleaser v2 compat, trigger release-binaries with workflow_run #540

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: GoReleaser
on:
release:
types: [ published ]

workflow_dispatch:
workflow_run:
workflows: [Releaser]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relases created by GitHub actions will not create other workflows, unless they use a GitHub Token other than the built-in default.

An alternative solution is to delete and recreate the release manually.

I pointed this out to IPDX team a while back and I believe there has been fixes rolled out to the unified CI? It's worth checking with them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 this seems to work in the lassie repo where we have essentially the same setup and no custom token configured

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice

types: [completed]
jobs:
bin-releaser:
name: Release Binaries
Expand All @@ -15,12 +18,12 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.19.x"
go-version: "1.22.x"
- name: Release Binaries
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 4 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json

version: 2
builds:
- main: ./car
dir: cmd
Expand All @@ -20,5 +23,4 @@ archives:
release:
mode: keep-existing
changelog:
skip: true

disable: true