Skip to content

chore(gh): goreleaser v2 #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025

Conversation

tenthirtyam
Copy link
Contributor

@tenthirtyam tenthirtyam commented Apr 8, 2025

Description

  • Use GoReleaser configuration to v2 without deprecated items.
  • Uses the recommended order.
  • Add .goreleaser.yml for use by a release workflow.
  • Add the terraform-registry-manifest.json needed for the release workflow. Reference.

Before:

terraform-provider-vcfa on main
➜ goreleaser check
  • checking                                 path=.goreleaser.yml
  • DEPRECATED:  archives.format  should not be used anymore, check https://goreleaser.com/deprecations#archivesformat for more info
  • .goreleaser.yml                                  error=configuration is valid, but uses deprecated properties
  ⨯ command failed                                   error=1 out of 1 configuration file(s) have issues

After:

terraform-provider-vcfa on chore(gh)/goreleaser-v2
➜ goreleaser check
  • checking                                 path=.goreleaser.yml
  • 1 configuration file(s) validated
  • thanks for using GoReleaser!

Tip

When you add .github/workflows/release.yml the following is recommended.

---
name: Release

on:
  push:
    tags:
      - "v*"

permissions:
  contents: write

jobs:
  goreleaser:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
        with:
          fetch-depth: 0
      - name: Setup Go
        uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
        with:
          go-version-file: "go.mod"
      - name: Import GPG Key
        id: import_gpg
        uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
        with:
          gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
          passphrase: ${{ secrets.GPG_PASSPHRASE }}
      - name: Run GoReleaser
        uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
        with:
          version: latest
          args: release --clean --timeout 60m --release-header-tmpl .goreleaser.tmpl
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

@tenthirtyam tenthirtyam force-pushed the chore(gh)/goreleaser-v2 branch from 94b2537 to 232395f Compare April 10, 2025 12:44
@tenthirtyam
Copy link
Contributor Author

@lvirbalas @Didainius @adambarreiro - appears to be ready for merge.

- Use GoReleaser configuration to v2 without deprecated items.
- Uses the recommended order.
- Add `.goreleaser.yml` for use by a release workflow.
- Add the `terraform-registry-manifest.json` needed for the release workflow.

Signed-off-by: Ryan Johnson <[email protected]>
@tenthirtyam tenthirtyam force-pushed the chore(gh)/goreleaser-v2 branch from 232395f to b646a10 Compare April 24, 2025 03:06
@adambarreiro adambarreiro merged commit 8eef55b into vmware:main May 5, 2025
2 checks passed
@tenthirtyam tenthirtyam deleted the chore(gh)/goreleaser-v2 branch May 5, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants