Skip to content

Commit

Permalink
rebase and squash jackgopack4 commits
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgopack4 committed Jul 30, 2024
1 parent 1e67d14 commit 57fc3ea
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/builder-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Builder - Release

on:
push:
tags:
- "cmd/builder/v*"

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout Releases Repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
repository: "open-telemetry/opentelemetry-collector-releases"
- name: Checkout Core Repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
repository: "open-telemetry/opentelemetry-collector"
ref: ${{ github.ref_name }}
path: ".core"
- name: List directory contents
run: ls -al
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ~1.21.5
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
distribution: goreleaser-pro
version: latest
args: release --clean -f cmd/builder/.goreleaser.yml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dist/
.idea
.generated-yaml/
.vscode
.core
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ifeq (, $(shell command -v ocb 2>/dev/null))
[ "$${machine}" != x86_64 ] || machine=amd64 ;\
echo "Installing ocb ($${os}/$${machine}) at $(OTELCOL_BUILDER_DIR)";\
mkdir -p $(OTELCOL_BUILDER_DIR) ;\
curl -sfLo $(OTELCOL_BUILDER) "https://github.com/open-telemetry/opentelemetry-collector/releases/download/cmd%2Fbuilder%2Fv$(OTELCOL_BUILDER_VERSION)/ocb_$(OTELCOL_BUILDER_VERSION)_$${os}_$${machine}" ;\
curl -sfLo $(OTELCOL_BUILDER) "https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/cmd%2Fbuilder%2Fv$(OTELCOL_BUILDER_VERSION)/ocb_$(OTELCOL_BUILDER_VERSION)_$${os}_$${machine}" ;\
chmod +x $(OTELCOL_BUILDER) ;\
}
else
Expand Down
39 changes: 39 additions & 0 deletions cmd/builder/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
before:
hooks:
- go mod download
monorepo:
tag_prefix: cmd/builder/
dir: .core/cmd/builder
builds:
- flags:
- -trimpath
ldflags:
- -s -w -X go.opentelemetry.io/collector/cmd/builder/internal.version={{.Version}} -X go.opentelemetry.io/collector/cmd/builder/internal.date={{.Date}}
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
- ppc64le
ignore:
- goos: windows
goarch: arm64
binary: ocb
release:
github:
owner: open-telemetry
name: opentelemetry-collector-releases
header: |
### Images and binaries here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/{{ .Tag }}
archives:
- format: binary
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
disable: true

0 comments on commit 57fc3ea

Please sign in to comment.