From a04d5d60a20f890453193159fe201ac799fb9a76 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Thu, 29 Aug 2024 16:21:26 +0300 Subject: [PATCH 1/3] - Goreleaser action version updated - Go installer version updated - config files for goreleaser for prod and dev releases updated --- .../release-dev.build-and-publish.yml | 10 ++--- .../release-prod.build-and-publish.yml | 10 ++--- .goreleaser.yml | 45 +++++++++---------- .goreleaser_push.yml | 43 +++++++++--------- 4 files changed, 49 insertions(+), 59 deletions(-) diff --git a/.github/workflows/release-dev.build-and-publish.yml b/.github/workflows/release-dev.build-and-publish.yml index b22fee37..f55debbc 100644 --- a/.github/workflows/release-dev.build-and-publish.yml +++ b/.github/workflows/release-dev.build-and-publish.yml @@ -14,9 +14,7 @@ jobs: steps: - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: 1.18.x + uses: actions/setup-go@v5 - name: Checkout code uses: actions/checkout@v2 @@ -29,12 +27,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..b078c00c 100644 --- a/.github/workflows/release-prod.build-and-publish.yml +++ b/.github/workflows/release-prod.build-and-publish.yml @@ -12,9 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: 1.18.x + uses: actions/setup-go@v5 - name: Checkout code uses: actions/checkout@v2 @@ -28,12 +26,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..a23bb5ec 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,24 +84,19 @@ 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 +# Repository to push the app manifest to. +scoops: + - + repository: + owner: hazelops + name: scoop-ize # Optionally a branch can be provided. # Defaults to the default repository branch. - branch: main + branch: main # Optionally a token can be provided, if it differs from the token provided to GoReleaser - token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" + token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" # Folder inside the repository to put the scoop. # Default is the root folder. @@ -107,31 +104,31 @@ scoop: # Git author used to commit to the repository. # Defaults are shown. - commit_author: - name: hazelops - email: ize@hazelops.com + 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 }}" + commit_msg_template: "Ize update for {{ .ProjectName }} version {{ .Tag }}" # Your app's homepage. # Default is empty. - homepage: "https://ize.sh/" + 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" + 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 + 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 + skip_upload: false # Persist data between application updates # persist: @@ -149,4 +146,4 @@ scoop: # GOAMD64 to specify which amd64 version to use if there are multiple versions # from the build section. # Default is v1. -# goamd64: v3 + # goamd64: v3 diff --git a/.goreleaser_push.yml b/.goreleaser_push.yml index b16e3b73..c87beec0 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,56 +88,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 }}" - +scoops: + - # Repository to push the app manifest to. - bucket: - owner: hazelops - name: scoop-ize + repository: + owner: hazelops + name: scoop-ize # Optionally a branch can be provided. # Defaults to the default repository branch. - branch: main + branch: main # Optionally a token can be provided, if it differs from the token provided to GoReleaser - token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" + token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" # Folder inside the repository to put the scoop. # Default is the root folder. - folder: dev + directory: dev # Git author used to commit to the repository. # Defaults are shown. - commit_author: - name: hazelops - email: ize@hazelops.com + 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 }}" + commit_msg_template: "Ize update for {{ .ProjectName }} version {{ .Tag }}" # Your app's homepage. # Default is empty. - homepage: "https://ize.sh/" + 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" + 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 + 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 + skip_upload: false # Persist data between application updates # persist: From 23d31951420859c23799dce1b3d5b0f232259c33 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Thu, 29 Aug 2024 19:11:29 +0300 Subject: [PATCH 2/3] Update&Fix --- .../release-dev.build-and-publish.yml | 2 ++ .../release-prod.build-and-publish.yml | 2 ++ .goreleaser.yml | 26 +++++++++---------- .goreleaser_push.yml | 2 +- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release-dev.build-and-publish.yml b/.github/workflows/release-dev.build-and-publish.yml index f55debbc..84728156 100644 --- a/.github/workflows/release-dev.build-and-publish.yml +++ b/.github/workflows/release-dev.build-and-publish.yml @@ -15,6 +15,8 @@ jobs: steps: - name: Install Go uses: actions/setup-go@v5 + with: + go-version: '1.20.x' - name: Checkout code uses: actions/checkout@v2 diff --git a/.github/workflows/release-prod.build-and-publish.yml b/.github/workflows/release-prod.build-and-publish.yml index b078c00c..6521d2be 100644 --- a/.github/workflows/release-prod.build-and-publish.yml +++ b/.github/workflows/release-prod.build-and-publish.yml @@ -13,6 +13,8 @@ jobs: steps: - name: Install Go uses: actions/setup-go@v5 + with: + go-version: '1.20.x' - name: Checkout code uses: actions/checkout@v2 diff --git a/.goreleaser.yml b/.goreleaser.yml index a23bb5ec..318409b5 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -88,25 +88,25 @@ archives: scoops: - repository: - owner: hazelops - name: scoop-ize + 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 + 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 }}" @@ -146,4 +146,4 @@ scoops: # 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 c87beec0..3380785e 100644 --- a/.goreleaser_push.yml +++ b/.goreleaser_push.yml @@ -150,4 +150,4 @@ scoops: # GOAMD64 to specify which amd64 version to use if there are multiple versions # from the build section. # Default is v1. -# goamd64: v3 + From 3a22db72b0efbb7a5f037a1f9d12fea6248348dc Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Thu, 29 Aug 2024 20:25:04 +0300 Subject: [PATCH 3/3] Update & Fix comments --- .../release-dev.build-and-publish.yml | 2 +- .../release-prod.build-and-publish.yml | 2 +- .goreleaser.yml | 37 +++--- .goreleaser_push.yml | 118 +++++++++--------- 4 files changed, 78 insertions(+), 81 deletions(-) diff --git a/.github/workflows/release-dev.build-and-publish.yml b/.github/workflows/release-dev.build-and-publish.yml index 84728156..ccb7c522 100644 --- a/.github/workflows/release-dev.build-and-publish.yml +++ b/.github/workflows/release-dev.build-and-publish.yml @@ -16,7 +16,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.20.x' + go-version: '1.23' - name: Checkout code uses: actions/checkout@v2 diff --git a/.github/workflows/release-prod.build-and-publish.yml b/.github/workflows/release-prod.build-and-publish.yml index 6521d2be..d36fd197 100644 --- a/.github/workflows/release-prod.build-and-publish.yml +++ b/.github/workflows/release-prod.build-and-publish.yml @@ -14,7 +14,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.20.x' + go-version: '1.23' - name: Checkout code uses: actions/checkout@v2 diff --git a/.goreleaser.yml b/.goreleaser.yml index 318409b5..5b3fdef7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -21,7 +21,7 @@ builds: - viper_toml1 brews: - - + - name: ize repository: owner: hazelops @@ -84,9 +84,9 @@ archives: - goos: windows format: zip -# Repository to push the app manifest to. + scoops: - - + - # Repository to push the app manifest to. repository: owner: hazelops name: scoop-ize @@ -100,34 +100,34 @@ scoops: # Folder inside the repository to put the scoop. # Default is the root folder. - # directory: latest +# directory: latest - # Git author used to commit to the repository. - # Defaults are shown. + # 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. + # 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. + # Your app's homepage. + # Default is empty. homepage: "https://ize.sh/" - # Your app's description. - # Default is empty. + # 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. + # 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. + # 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 @@ -146,4 +146,3 @@ scoops: # GOAMD64 to specify which amd64 version to use if there are multiple versions # from the build section. # Default is v1. - diff --git a/.goreleaser_push.yml b/.goreleaser_push.yml index 3380785e..8b3acbe8 100644 --- a/.goreleaser_push.yml +++ b/.goreleaser_push.yml @@ -90,64 +90,62 @@ archives: 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 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. + 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.