Skip to content

Commit

Permalink
Update CI workflow to publish releases to Cloudsmith (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephcummings authored May 2, 2024
1 parent 55f5c12 commit b5afacf
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ jobs:
GOEXPERIMENT: boringcrypto
run: go test ./...
-
name: Build and Publish
name: Build and Publish (Dry Run)
uses: goreleaser/goreleaser-action@v3
if: ${{ startsWith(github.ref, 'refs/tags/') }}
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
with:
version: latest
args: release --clean
args: release --skip-publish --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOEXPERIMENT: boringcrypto
-
name: Build and Publish (Dry Run)
name: Build and Publish
uses: goreleaser/goreleaser-action@v3
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
version: latest
args: release --skip-publish --clean --snapshot
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOEXPERIMENT: boringcrypto
Expand All @@ -74,7 +74,7 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
Expand All @@ -89,6 +89,22 @@ jobs:
tags: ghcr.io/${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
-
name: Login to Cloudsmith Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: docker.eventstore.com
username: ${{ secrets.CLOUDSMITH_CICD_USER }}
password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}
-
name: Push to Cloudsmith
uses: docker/build-push-action@v3
with:
push: ${{ github.event_name != 'pull_request' }}
tags: docker.eventstore.com/${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64

test-windows:
runs-on: windows-latest
Expand Down

0 comments on commit b5afacf

Please sign in to comment.