Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/build-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ on:
push:
paths-ignore:
#- '.github/**'
- '.gitignore'
- 'LICENSE'
- '*.md'
- ".gitignore"
- "LICENSE"
- "*.md"
pull_request:
paths-ignore:
- '.github/**'
- '.gitignore'
- 'LICENSE'
- '*.md'
permissions:
- ".github/**"
- ".gitignore"
- "LICENSE"
- "*.md"
permissions:
contents: read
id-token: write # needed for signing the images with GitHub OIDC Token

Expand All @@ -32,7 +32,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.3'
go-version: "1.21.3"

- name: Build Go packages
run: |
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: goreleaser
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename this file to release.yml and align triger actions to the one we use in other repo like https://github.com/microcks/microcks-testcontainers-go/blob/main/.github/workflows/release.yml?


on:
push:
tags:
- "*"

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to the same version that is used in build-verify.yml? We must be sure we reuse the same version here.

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "${{ env.GITHUB_REF_NAME }}"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
26 changes: 26 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you have a check at https://github.com/microcks/microcks-testcontainers-go/blob/main/.goreleaser.yaml and also integrate the signing part here?


builds:
- main: ./main.go
binary: microcks-cli
env:
- CGO_ENABLED=0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: where do you define target platforms for the build? We used to define them into a sh build script here: https://github.com/microcks/microcks-cli/blob/master/build-binaries.sh#L12?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goreleaser provides default OS and Arch if the parameter is not specified -> See here
I can detail it for more clarity.

    # GOOS list to build for.
    # For more info refer to: https://pkg.go.dev/cmd/go#hdr-Environment_variables
    #
    # Default: [ 'darwin', 'linux', 'windows' ].
    goos:
      - freebsd
      - windows

    # GOARCH to build for.
    # For more info refer to: https://pkg.go.dev/cmd/go#hdr-Environment_variables
    #
    # Default: [ '386', 'amd64', 'arm64' ].
    goarch:
      - amd64
      - arm
      - arm64
      ```


release:
prerelease: auto

universal_binaries:
- replace: true

brews:
- name: microcks-cli
homepage: https://github.com/microcks/microcks-cli
repository:
owner: microcks
name: homebrew-tap

sboms:
- artifacts: archive

checksum:
name_template: "checksums.txt"
Loading