diff --git a/.github/workflows/build-verify.yml b/.github/workflows/build-verify.yml index 3b2ad96..dad6891 100644 --- a/.github/workflows/build-verify.yml +++ b/.github/workflows/build-verify.yml @@ -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 @@ -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: | diff --git a/.github/workflows/goreleaser.yaml b/.github/workflows/goreleaser.yaml new file mode 100644 index 0000000..6cb9d29 --- /dev/null +++ b/.github/workflows/goreleaser.yaml @@ -0,0 +1,30 @@ +name: goreleaser + +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 + - 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 }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..c46389d --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,26 @@ +version: 2 + +builds: + - main: ./main.go + binary: microcks-cli + env: + - CGO_ENABLED=0 + +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"