Skip to content

Commit

Permalink
feat: Update goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
mailo-nr committed Jan 9, 2025
1 parent 6fa9ac5 commit af43351
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
password: ${{ secrets.OHAI_DOCKER_HUB_PASSWORD }}

- name: Build binaries & packages with GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v1'
version: '~> v2'
args: release --rm-dist --timeout 2h
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-prerelease_linux_on_demand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ jobs:
password: ${{ secrets.OHAI_DOCKER_HUB_PASSWORD }}

- name: Build binaries & packages with GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v1'
version: '~> v2'
args: release --rm-dist --skip-docker --skip-publish --timeout 2h
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
- uses: docker/setup-buildx-action@v2

- name: Build binaries & packages with GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v1'
version: '~> v2'
args: --snapshot --clean --skip-sign --timeout 2h

- name: Extract image version
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:
- uses: docker/setup-buildx-action@v2

- name: Build binaries & packages with GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v1'
args: --snapshot --clean --skip-sign --timeout 2h
version: '~> v2'
args: --snapshot --clean --skip=sign --timeout 2h

- name: Extract image version
run: echo "version=$(jq -r '.version' dist/metadata.json)" >> $GITHUB_ENV
Expand Down
3 changes: 2 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
project_name: opentelemetry-collector-releases
builds:
- id: nr-otel-collector
Expand Down Expand Up @@ -157,4 +158,4 @@ checksum:

# Skip auto-generating changelog.
changelog:
skip: true
disable: true
4 changes: 3 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ container_path_ocb_config="${container_work_dir}/${ocb_config}"

echo "Building: $distribution"
docker run \
--name ocb \
-v "$(pwd)/${ocb_config}:${container_path_ocb_config}" \
-v "$(pwd)/${output_dir}:${container_work_dir}/${output_dir}:rw" \
"${builder_image}" \
--config "${container_path_ocb_config}" \
--skip-compilation=${skipcompilation}

docker cp "ocb:${container_work_dir}/${output_dir}/." "${output_dir}"

if [[ "$ensure_docker_write_permissions" == "true" ]]; then
# change owner of output dir back to the 'build' user to allow access for following steps
sudo chown -R $(id -u):$(id -g) "${output_dir}"
Expand Down

0 comments on commit af43351

Please sign in to comment.