v0.0.7 #3
Workflow file for this run
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
# based on: https://github.com/open-telemetry/opentelemetry-collector-releases/blob/main/.github/workflows/release.yaml | |
name: Release | |
on: | |
push: | |
tags: ["v*"] | |
jobs: | |
release: | |
permissions: | |
id-token: write | |
packages: write | |
contents: write | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64,linux/arm/v7 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '~1.21.5' | |
check-latest: true | |
- name: Generate distribution sources | |
run: | | |
go install go.opentelemetry.io/collector/cmd/[email protected] | |
cd collector | |
builder --config otelcol-builder.yaml --skip-compilation | |
- name: Login to GitHub Package Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- shell: bash | |
run: | | |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- uses: anchore/sbom-action/[email protected] | |
- name: Install cosign | |
run: go install github.com/sigstore/cosign/cmd/[email protected] | |
- name: Build cosign key file | |
run: 'echo "$COSIGN_PRIVATE_KEY" >> cosign.key' | |
shell: bash | |
env: | |
COSIGN_PRIVATE_KEY: ${{secrets.ORG_COSIGN_PRIVATE_KEY}} | |
- uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean --skip=sign --timeout 2h | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COSIGN_PWD: ${{ secrets.ORG_COSIGN_PWD }} |