Skip to content

Commit

Permalink
Merge pull request #552 from hazelops/IZE-776-go-releaser-upgraded
Browse files Browse the repository at this point in the history
IZE-776 Goreleaser & Go installer updated
  • Loading branch information
kobrikx authored Aug 30, 2024
2 parents 97d7c0e + 3a22db7 commit 4693e73
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 123 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release-dev.build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release-prod.build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
82 changes: 39 additions & 43 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
project_name: ize
builds:
- env: [CGO_ENABLED=0]
Expand All @@ -20,8 +21,9 @@ builds:
- viper_toml1

brews:
- name: ize
tap:
-
name: ize
repository:
owner: hazelops
name: homebrew-ize
branch: main
Expand Down Expand Up @@ -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/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Default for gitlab is "https://gitlab.com/<repo_owner>/<repo_name>/-/releases/{{ .Tag }}/downloads/{{ .ArtifactName }}"
# Default for gitea is "https://gitea.com/<repo_owner>/<repo_name>/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: [email protected]
# Git author used to commit to the repository.
# Defaults are shown.
commit_author:
name: hazelops
email: [email protected]

# 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:
Expand All @@ -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
135 changes: 65 additions & 70 deletions .goreleaser_push.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
project_name: ize
builds:
- env: [CGO_ENABLED=0]
Expand All @@ -23,8 +24,9 @@ release:
prerelease: true

brews:
- name: ize-dev
tap:
-
name: ize-dev
repository:
owner: hazelops
name: homebrew-ize
branch: main
Expand Down Expand Up @@ -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/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Default for gitlab is "https://gitlab.com/<repo_owner>/<repo_name>/-/releases/{{ .Tag }}/downloads/{{ .ArtifactName }}"
# Default for gitea is "https://gitea.com/<repo_owner>/<repo_name>/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: [email protected]

# 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: [email protected]

# 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.

0 comments on commit 4693e73

Please sign in to comment.