-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
squashed commits for ocb build/release migration
- Loading branch information
1 parent
5342205
commit 629766b
Showing
5 changed files
with
146 additions
and
2 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,43 @@ | ||
name: Builder - Release | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Releases Repo | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
fetch-depth: 0 | ||
- run: ls -la | ||
- name: Push cmd/builder Tag | ||
run: | | ||
tag="cmd/builder/${{ github.ref_name }}" | ||
message="Releasing ocb binaries for ${{ github.ref_name }}" | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
git tag -a "${tag}" -m "${message}" | ||
git push origin "${tag}" | ||
- 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: 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 }} |
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,61 @@ | ||
name: Builder - Check and Test Build | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "distributions/otelcol-contrib/**" | ||
- "cmd/**" | ||
- ".github/**" | ||
- "scripts/**" | ||
- "Makefile" | ||
- "go.mod" | ||
- "go.sum" | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "distributions/otelcol-contrib/**" | ||
- "cmd/**" | ||
- ".github/**" | ||
- "scripts/**" | ||
- "Makefile" | ||
- "go.mod" | ||
- "go.sum" | ||
|
||
jobs: | ||
check-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" | ||
path: ".core" | ||
- name: Setup Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: ~1.21.5 | ||
- name: Check GoReleaser | ||
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 | ||
with: | ||
distribution: goreleaser-pro | ||
version: latest | ||
args: check --verbose -f cmd/builder/.goreleaser.yml | ||
env: | ||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 | ||
with: | ||
distribution: goreleaser-pro | ||
version: latest | ||
args: --snapshot --clean -f cmd/builder/.goreleaser.yml | ||
env: | ||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ dist/ | |
.idea | ||
.generated-yaml/ | ||
.vscode | ||
.core |
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
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,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 |