Skip to content

Commit

Permalink
Test with ko-goreleaser-magefile stack again
Browse files Browse the repository at this point in the history
  • Loading branch information
alperencelik committed Jan 7, 2024
1 parent 89af703 commit bf90963
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 54 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,26 @@ on:
- '*'

jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
# verify:
# runs-on: ubuntu-latest
# steps:
# - name: Set up Go
# uses: actions/setup-go@v2
# with:
# go-version: 1.21

- name: Check out code
uses: actions/checkout@v2
# - name: Check out code
# uses: actions/checkout@v2

- name: Run mage.go
run: go run mage.go
# - name: Run mage.go
# run: go run mage.go

release:
needs: verify
permissions:
packages: write
contents: write
id-token: write
# needs: verify
runs-on: ubuntu-latest
steps:
- name: Set up Go
Expand Down
63 changes: 23 additions & 40 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,29 @@ builds:
goarm: 6
mod_timestamp: '{{ .CommitTimestamp }}'

kos:
- id: kubemox-image
build: kubemox
main: ./cmd/...
base_image: ghcr.io/distroless/static:latest
platforms:
- all
ldflags:
- -extldflags "-static"
- -s
- -w
tags:
- latest
- '{{ .Tag }}'
env:
- CGO_ENABLED=0
flags:
- -trimpath
sbom: none
bare: true
preserve_import_paths: false
base_import_paths: false

archives:
- id: with-version
name_template: >-
Expand Down Expand Up @@ -76,43 +99,3 @@ changelog:
- 'README'
- Merge pull request
- Merge branch

github_urls:
api: https://api.github.com/
download: https://github.com/
skip_tls_verify: false

release:
github:
owner: "alperencelik"
name: "kubemox"
disable: false

kos:
- id: kubemox-image
build: kubemox
main: ./cmd/...
base_image: ghcr.io/distroless/static:latest
platforms:
- linux/amd64
- linux/arm64
- darwin/amd64
- darwin/arm64
- windows/amd64
- windows/arm64
# - all
ldflags:
- -extldflags "-static"
- -s
- -w
tags:
- latest
- '{{ .Tag }}'
env:
- CGO_ENABLED=0
flags:
- -trimpath
sbom: none
bare: true
preserve_import_paths: false
base_import_paths: false
2 changes: 0 additions & 2 deletions .ko.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ builds:
main: main.go
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -extldflags "-static"
- -s
Expand Down

0 comments on commit bf90963

Please sign in to comment.