ci: fix release workflow for multi-platform Docker builds

- Add QEMU + Docker Buildx setup before GoReleaser (required for linux/amd64+arm64)
- Remove redundant publish-docker job (GoReleaser handles multi-platform builds)
- Update GO_VERSION to 1.26.0
- Fix go install path: cmd/lux-mpc -> cmd/mpcd
This commit is contained in:
2025-12-27 17:29:53 -08:00
parent 7d984692b8
commit 5916fe46f9
+9 -59
View File
@@ -12,7 +12,7 @@ on:
type: string
env:
GO_VERSION: '1.25.5'
GO_VERSION: '1.26.0'
permissions:
contents: write
@@ -38,6 +38,12 @@ jobs:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
@@ -66,66 +72,10 @@ jobs:
name: release-artifacts
path: dist/
publish-docker:
name: Publish Docker Images
runs-on: ubuntu-latest
needs: goreleaser
strategy:
matrix:
platform: [linux/amd64, linux/arm64]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
luxfi/mpc
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ matrix.platform }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
create-release-notes:
name: Create Release Notes
runs-on: ubuntu-latest
needs: [goreleaser, publish-docker]
needs: goreleaser
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -168,7 +118,7 @@ jobs:
#### Go Install
```bash
go install github.com/luxfi/mpc/cmd/lux-mpc@${{ github.ref_name }}
go install github.com/luxfi/mpc/cmd/mpcd@${{ github.ref_name }}
go install github.com/luxfi/mpc/cmd/lux-mpc-cli@${{ github.ref_name }}
```