Skip to content

Commit

Permalink
test releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
kindermax committed Jan 28, 2025
1 parent 60cae23 commit b164c9d
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 69 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
pull_request:
branches:
- master

permissions:
contents: write # needed to write releases

name: Build
jobs:
test-releaser:
runs-on: ubuntu-latest
steps:
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: 1.23.x
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # this is important, otherwise it won't checkout the full tree (i.e. no previous tags)
- name: Build
env:
PACKAGE_NAME: github.com/lets-cli/lets
GOLANG_CROSS_VERSION: v1.23
run: |
docker run \
--rm \
-e CGO_ENABLED=1 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/${PACKAGE_NAME}\
-v `pwd`/sysroot:/sysroot \
-w /go/src/${PACKAGE_NAME} \
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
--clean --skip=validate --skip=publish --snapshot
# - name: Releaser build
# uses: goreleaser/goreleaser-action@v4
# with:
# distribution: goreleaser
# version: v2.6.1
# args: build --clean --skip=validate --snapshot --single-target
# env:
# GOOS: darwin
# GOARCH: amd64
# ZIG_LOCAL_CACHE_DIR: ${{ steps.set_env.outputs.current_dir }}
# ZIG_GLOBAL_CACHE_DIR: ${{ steps.set_env.outputs.current_dir }}
# SDK_PATH: ${{ steps.set_env.outputs.sdk_path }}
56 changes: 0 additions & 56 deletions .github/workflows/test.yaml

This file was deleted.

29 changes: 16 additions & 13 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ release:
prerelease: auto

builds:
- env:
- CGO_ENABLED=1
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ignore:
- goos: linux
goarch: arm64
ldflags:
- -X main.version={{.Version}}
- id: darwin-amd64
main: ./
binary: golang-cross
goos:
- darwin
goarch:
- amd64
env:
- PKG_CONFIG_SYSROOT_DIR=/sysroot/macos/amd64
- PKG_CONFIG_PATH=/sysroot/macos/amd64/usr/local/lib/pkgconfig
- CC=o64-clang
- CXX=o64-clang++
flags:
- -mod=readonly
ldflags:
- -s -w -X main.version={{.Version}}

archives:
- formats: [tar.gz]
Expand Down

0 comments on commit b164c9d

Please sign in to comment.