Skip to content

Commit

Permalink
fix: release machinery
Browse files Browse the repository at this point in the history
  • Loading branch information
chavacava committed Jan 18, 2025
1 parent 7753bba commit 1c7890d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 64 deletions.
65 changes: 1 addition & 64 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,67 +28,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

buildx:
runs-on: ubuntu-latest

env:
PLATFORMS: linux/amd64,linux/arm64
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io

permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:

- name: Checkout
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,prefix=v,pattern={{version}}
type=semver,prefix=v,pattern={{major}}.{{minor}}
type=semver,prefix=v,pattern={{major}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: push
uses: docker/build-push-action@v6
with:
platforms: ${{ env.PLATFORMS }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
BUILDER=buildx
push: true

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

1 change: 1 addition & 0 deletions .goreleaser → .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ builds:
- linux
- darwin
- windows
main: ./cmd/

changelog:
filters:
Expand Down

0 comments on commit 1c7890d

Please sign in to comment.