diff --git a/.github/workflows/release-dev.build-and-publish.yml b/.github/workflows/release-dev.build-and-publish.yml index b22fee37..ccb7c522 100644 --- a/.github/workflows/release-dev.build-and-publish.yml +++ b/.github/workflows/release-dev.build-and-publish.yml @@ -14,9 +14,9 @@ jobs: steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: 1.18.x + go-version: '1.23' - name: Checkout code uses: actions/checkout@v2 @@ -29,12 +29,12 @@ jobs: # TODO: This should run only if all tests are satisfying - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v6 with: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser - version: latest - args: release -f .goreleaser_push.yml --rm-dist + version: "~> v2" + args: release -f .goreleaser_push.yml --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} diff --git a/.github/workflows/release-prod.build-and-publish.yml b/.github/workflows/release-prod.build-and-publish.yml index 96e177a7..d36fd197 100644 --- a/.github/workflows/release-prod.build-and-publish.yml +++ b/.github/workflows/release-prod.build-and-publish.yml @@ -12,9 +12,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: 1.18.x + go-version: '1.23' - name: Checkout code uses: actions/checkout@v2 @@ -28,12 +28,12 @@ jobs: # TODO: This should run only if all tests are satisfying - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v6 with: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser - version: latest - args: release -f .goreleaser.yml --rm-dist + version: "~> v2" + args: release -f .goreleaser.yml --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 2ac57a9e..5b3fdef7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,3 +1,4 @@ +version: 2 project_name: ize builds: - env: [CGO_ENABLED=0] @@ -20,8 +21,9 @@ builds: - viper_toml1 brews: - - name: ize - tap: + - + name: ize + repository: owner: hazelops name: homebrew-ize branch: main @@ -82,56 +84,51 @@ archives: - goos: windows format: zip -scoop: - # Template for the url which is determined by the given Token (github or gitlab) - # Default for github is "https://github.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" - # Default for gitlab is "https://gitlab.com///-/releases/{{ .Tag }}/downloads/{{ .ArtifactName }}" - # Default for gitea is "https://gitea.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" -# url_template: "https://github.com/hazelops/ize/releases/download/{{ .Tag }}/{{ .ArtifactName }}" - # Repository to push the app manifest to. - bucket: - owner: hazelops - name: scoop-ize +scoops: + - # Repository to push the app manifest to. + repository: + owner: hazelops + name: scoop-ize - # Optionally a branch can be provided. - # Defaults to the default repository branch. - branch: main + # Optionally a branch can be provided. + # Defaults to the default repository branch. + branch: main - # Optionally a token can be provided, if it differs from the token provided to GoReleaser - token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" + # Optionally a token can be provided, if it differs from the token provided to GoReleaser + token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" - # Folder inside the repository to put the scoop. - # Default is the root folder. -# folder: latest + # Folder inside the repository to put the scoop. + # Default is the root folder. +# directory: latest - # Git author used to commit to the repository. - # Defaults are shown. - commit_author: - name: hazelops - email: ize@hazelops.com + # Git author used to commit to the repository. + # Defaults are shown. + commit_author: + name: hazelops + email: ize@hazelops.com - # The project name and current git tag are used in the format string. - commit_msg_template: "Ize update for {{ .ProjectName }} version {{ .Tag }}" + # The project name and current git tag are used in the format string. + commit_msg_template: "Ize update for {{ .ProjectName }} version {{ .Tag }}" - # Your app's homepage. - # Default is empty. - homepage: "https://ize.sh/" + # Your app's homepage. + # Default is empty. + homepage: "https://ize.sh/" - # Your app's description. - # Default is empty. - description: "IZE is an opinionated infrastructure wrapper that allows to use multiple tools in one infra" + # Your app's description. + # Default is empty. + description: "IZE is an opinionated infrastructure wrapper that allows to use multiple tools in one infra" - # Your app's license - # Default is empty. - license: Apache License 2.0 + # Your app's license + # Default is empty. + license: Apache License 2.0 - # Setting this will prevent goreleaser to actually try to commit the updated - # manifest leaving the responsibility of publishing it to the user. - # If set to auto, the release will not be uploaded to the scoop bucket - # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1 - # Default is false. - skip_upload: false + # Setting this will prevent goreleaser to actually try to commit the updated + # manifest leaving the responsibility of publishing it to the user. + # If set to auto, the release will not be uploaded to the scoop bucket + # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1 + # Default is false. + skip_upload: false # Persist data between application updates # persist: @@ -149,4 +146,3 @@ scoop: # GOAMD64 to specify which amd64 version to use if there are multiple versions # from the build section. # Default is v1. -# goamd64: v3 diff --git a/.goreleaser_push.yml b/.goreleaser_push.yml index b16e3b73..8b3acbe8 100644 --- a/.goreleaser_push.yml +++ b/.goreleaser_push.yml @@ -1,3 +1,4 @@ +version: 2 project_name: ize builds: - env: [CGO_ENABLED=0] @@ -23,8 +24,9 @@ release: prerelease: true brews: - - name: ize-dev - tap: + - + name: ize-dev + repository: owner: hazelops name: homebrew-ize branch: main @@ -86,71 +88,64 @@ archives: - goos: windows format: zip -scoop: - # Template for the url which is determined by the given Token (github or gitlab) - # Default for github is "https://github.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" - # Default for gitlab is "https://gitlab.com///-/releases/{{ .Tag }}/downloads/{{ .ArtifactName }}" - # Default for gitea is "https://gitea.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" -# url_template: "https://github.com/hazelops/ize/releases/download/{{ .Tag }}/{{ .ArtifactName }}" - - # Repository to push the app manifest to. - bucket: - owner: hazelops - name: scoop-ize - - # Optionally a branch can be provided. - # Defaults to the default repository branch. - branch: main - - # Optionally a token can be provided, if it differs from the token provided to GoReleaser - token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" - - # Folder inside the repository to put the scoop. - # Default is the root folder. - folder: dev - - # Git author used to commit to the repository. - # Defaults are shown. - commit_author: - name: hazelops - email: ize@hazelops.com - - # The project name and current git tag are used in the format string. - commit_msg_template: "Ize update for {{ .ProjectName }} version {{ .Tag }}" - - # Your app's homepage. - # Default is empty. - homepage: "https://ize.sh/" - - # Your app's description. - # Default is empty. - description: "IZE is an opinionated infrastructure wrapper that allows to use multiple tools in one infra" - - # Your app's license - # Default is empty. - license: Apache License 2.0 - - # Setting this will prevent goreleaser to actually try to commit the updated - # manifest leaving the responsibility of publishing it to the user. - # If set to auto, the release will not be uploaded to the scoop bucket - # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1 - # Default is false. - skip_upload: false - - # Persist data between application updates - # persist: - # - "data" - # - "config.toml" - - # An array of commands to be executed before an application is installed. - # Default is empty. - # pre_install: ["Write-Host 'Running preinstall command'"] - - # An array of commands to be executed after an application is installed. - # Default is empty. - # post_install: ["Write-Host 'Running postinstall command'"] - - # GOAMD64 to specify which amd64 version to use if there are multiple versions - # from the build section. - # Default is v1. -# goamd64: v3 +scoops: + - + repository: # Repository to push the app manifest to. + owner: hazelops + name: scoop-ize + + # Optionally a branch can be provided. + # Defaults to the default repository branch. + branch: main + + # Optionally a token can be provided, if it differs from the token provided to GoReleaser + token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" + + # Folder inside the repository to put the scoop. + # Default is the root folder. + directory: dev + + # Git author used to commit to the repository. + # Defaults are shown. + commit_author: + name: hazelops + email: ize@hazelops.com + + # The project name and current git tag are used in the format string. + commit_msg_template: "Ize update for {{ .ProjectName }} version {{ .Tag }}" + + # Your app's homepage. + # Default is empty. + homepage: "https://ize.sh/" + + # Your app's description. + # Default is empty. + description: "IZE is an opinionated infrastructure wrapper that allows to use multiple tools in one infra" + + # Your app's license + # Default is empty. + license: Apache License 2.0 + + # Setting this will prevent goreleaser to actually try to commit the updated + # manifest leaving the responsibility of publishing it to the user. + # If set to auto, the release will not be uploaded to the scoop bucket + # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1 + # Default is false. + skip_upload: false + + # Persist data between application updates + # persist: + # - "data" + # - "config.toml" + + # An array of commands to be executed before an application is installed. + # Default is empty. + # pre_install: ["Write-Host 'Running preinstall command'"] + + # An array of commands to be executed after an application is installed. + # Default is empty. + # post_install: ["Write-Host 'Running postinstall command'"] + + # GOAMD64 to specify which amd64 version to use if there are multiple versions + # from the build section. + # Default is v1.