Skip to content

Commit

Permalink
Release scripts (#21)
Browse files Browse the repository at this point in the history
* Release scripts

Fixes #3

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

* Bump ocb version

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

* Fix go versions

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
  • Loading branch information
jpkrohling authored Sep 6, 2022
1 parent c6856fd commit b3307ed
Show file tree
Hide file tree
Showing 34 changed files with 1,166 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- name: Auto-update
run: ./scripts/update-to-latest-otelcol.sh -c true
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/ci-goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Continuous Integration - GoReleaser

on:
push:
branches: [main]
paths:
- ".goreleaser.yaml"
- "distributions/otlp-gateway/manifest.yaml"
- "distributions/sidecar/manifest.yaml"
- "distributions/tracing/manifest.yaml"
pull_request:
branches: [main]
paths:
- ".goreleaser.yaml"
- "distributions/otlp-gateway/manifest.yaml"
- "distributions/sidecar/manifest.yaml"
- "distributions/tracing/manifest.yaml"

jobs:
check-goreleaser:
name: Check GoReleaser Configuration
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64,ppc64le

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Generate the sources
run: make generate-sources

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: --snapshot --rm-dist --timeout 2h
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- name: Verify
run: make ci
47 changes: 47 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release

on:
push:
tags: ["v*"]

jobs:
release:
name: Release
runs-on: ubuntu-20.04

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

- name: Setup QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64,ppc64le

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Generate distribution sources
run: make generate-sources

- name: Login to GitHub Package Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist --timeout 2h
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
_build
test/logs
*.pid
.vscode
dist
Loading

0 comments on commit b3307ed

Please sign in to comment.