diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38bddae..dfc5014 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,7 @@ on: # GitHub considers creating releases and uploading assets as writing contents. permissions: contents: write + packages: write jobs: goreleaser: @@ -25,12 +26,11 @@ jobs: with: go-version-file: 'go.mod' cache: true - - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v6.1.0 - id: import_gpg + - uses: docker/login-action@v3 with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - # passphrase: ${{ secrets.PASSPHRASE }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5.0.0 with: @@ -38,4 +38,3 @@ jobs: env: # GitHub sets the GITHUB_TOKEN secret automatically. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 6c6444d..9f05f0f 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,12 +1,31 @@ -# .goreleaser.yaml -signs: - - artifacts: checksum - cmd: gpg2 - args: - - "--batch" - - "-u" - - "{{ .Env.GPG_FINGERPRINT }}" - - "--output" - - "${signature}" - - "--detach-sign" - - "${artifact}" +project_name: op-plasma-celestia +builds: + - env: [CGO_ENABLED=0] + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 +dockers: +- image_templates: ["ghcr.io/celestiaorg/op-plasma-celestia:{{ .Version }}"] + dockerfile: Dockerfile + build_flag_templates: + - --label=org.opencontainers.image.title={{ .ProjectName }} + - --label=org.opencontainers.image.description={{ .ProjectName }} + - --label=org.opencontainers.image.url=https://github.com/tuxcanfly/goreleaser-example + - --label=org.opencontainers.image.source=https://github.com/tuxcanfly/goreleaser-example + - --label=org.opencontainers.image.version={{ .Version }} + - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} + - --label=org.opencontainers.image.revision={{ .FullCommit }} + - --label=org.opencontainers.image.licenses=MIT +nfpms: +- maintainer: Javed Khan + description: Celestia Data Availability Provider for Optimism Plasma Protocol. + homepage: https://github.com/tuxcanfly/goreleaser-example + license: MIT + formats: + - deb + - rpm + - apk