Skip to content

Commit

Permalink
NSOF-8035 ci: add our custom build workflow script
Browse files Browse the repository at this point in the history
Build the ocoltel-contrib debian package and upload it as an artifact.

Goreleaser defaults to validate that releases are only done from tagged
versions therefore run it with --skip-validate.
  • Loading branch information
ebirger committed Sep 21, 2023
1 parent a069e82 commit 6507724
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/nsof-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Nsof release builder

on:
workflow_dispatch:
push:
branches: [nsof-*]
paths:
- ".goreleaser.yaml"
- "distributions/otelcol-contrib/manifest.yaml"

jobs:
build:
name: Build Debian Package
strategy:
matrix:
GOOS: [linux]
GOARCH: [amd64]
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '~1.21.1'
check-latest: true

- name: Generate the sources
run: make generate-sources
env:
DISTRIBUTIONS: otelcol-contrib

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: --skip-validate --skip-sign --clean --timeout 2h
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v3
with:
name: all-artifacts
path: dist/*/*

0 comments on commit 6507724

Please sign in to comment.