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

Release the OpAMP Supervisor #629

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
29 changes: 29 additions & 0 deletions .github/workflows/release-supervisor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release OpAMP Supervisor
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
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ~1.21.5
- name: Grab the Supervisor sources
run: make -C opampsupervisor getsource TAG_NAME=${{ github.ref_name }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
distribution: goreleaser-pro
version: latest
args: release --clean -f opampsupervisor/.goreleaser.yml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions opampsupervisor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src
32 changes: 32 additions & 0 deletions opampsupervisor/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
before:
hooks:
- go mod download
monorepo:
dir: ./src
builds:
- main: ./src
flags:
- -trimpath
ldflags:
- -s -w
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
binary: opampsupervisor
release:
github:
owner: open-telemetry
name: opentelemetry-collector-releases
header: |
### OpAMP Supervisor Release
archives:
- format: binary
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
disable: true
10 changes: 10 additions & 0 deletions opampsupervisor/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
TAG_NAME := ""
SUPERVISOR_MODULE := github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor@$(TAG_NAME)

src/go.sum:
go install $(SUPERVISOR_MODULE)
cp -r $$(go env GOMODCACHE)/$(SUPERVISOR_MODULE) .
chmod +w opampsupervisor@$(TAG_NAME)
mv opampsupervisor@$(TAG_NAME) src

getsource: src/go.sum
Loading