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

Chore/goreleaser upgrade #255

Merged
merged 10 commits into from
Oct 18, 2024
11 changes: 4 additions & 7 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ jobs:
- name: Setup OSX Cross Compiler Tool Chain Environment
run: |
echo "OSXCROSS_DIR=$(dirname $GITHUB_WORKSPACE)/osxcross" >> $GITHUB_ENV

- name: Clone OSX Cross Compiler Tool Chain
run: git clone $OSX_CROSS_TOOLCHAIN_REPOSITORY $OSXCROSS_DIR

Expand All @@ -62,22 +61,21 @@ jobs:
key: ${{ runner.os }}-osxcross-${{ env.OSX_CROSS_MACOS_SDK_VERSION }}
path: |
${{ env.OSXCROSS_DIR }}/target/bin

- name: Build OSX Cross Compiler Tool Chain
if: steps.osxcross-cache.outputs.cache-hit != 'true'
run: |
cd $OSXCROSS_DIR
SDK_VERSION=$OSX_CROSS_MACOS_SDK_VERSION UNATTENDED=yes ./build.sh

- name: Add OSX Cross Compiler Tool Chain to Path
run: |
echo "$OSXCROSS_DIR/target/bin" >> $GITHUB_PATH

- name: Run GoReleaser
id: run-goreleaser
uses: goreleaser/goreleaser-action@8f67e590f2d095516493f017008adc464e63adb1 # v4.1.0
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v4.1.0
abhisek marked this conversation as resolved.
Show resolved Hide resolved
with:
version: v1.26.2
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
Expand All @@ -100,5 +98,4 @@ jobs:
with:
base64-subjects: "${{ needs.goreleaser.outputs.hashes }}"
upload-assets: true
private-repository: true

private-repository: true
abhisek marked this conversation as resolved.
Show resolved Hide resolved
32 changes: 9 additions & 23 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
version: 2
before:
hooks:
- go mod tidy
Expand All @@ -10,31 +11,15 @@ env:

builds:
- id: linux
binary: vet
goos:
- linux
goarch:
- amd64
goos: [linux]
goarch: [amd64]
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++

- id: darwin-amd64
binary: vet
goos:
- darwin
goarch:
- amd64
env:
- CC=o64-clang
- CXX=o64-clang++

- id: darwin-arm64
binary: vet
goos:
- darwin
goarch:
- arm64
- id: darwin
abhisek marked this conversation as resolved.
Show resolved Hide resolved
goos: [darwin]
goarch: [amd64, arm64]
env:
- CC=o64-clang
- CXX=o64-clang++
Expand All @@ -51,7 +36,7 @@ brews:
homepage: https://safedep.io
description: "SafeDep vet is a tool for identifying open source software supply chain risks"
license: "Apache-2.0"
tap:
repository:
owner: safedep
name: homebrew-tap
branch: main
Expand All @@ -76,8 +61,9 @@ archives:
format: zip
checksum:
name_template: 'checksums.txt'
algorithm: sha256
snapshot:
name_template: "{{ incpatch .Version }}-next"
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
Expand Down
Loading