diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..72f7914 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,31 @@ +--- +name: release + +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.24.3 + cache: true + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: '~> v2' + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index d8662dc..a0db4f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ env/ workbench +# for goreleaser +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..6c66f6a --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,46 @@ +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj + +project_name: workbench + +version: 2 + +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... + +builds: + - main: ./cmd + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + +archives: + - formats: [tar.gz] + # this name template makes the OS and Arch compatible with the results of `uname`. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + formats: [zip] + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + +release: {} diff --git a/README.md b/README.md index b1b5c8e..26a3da3 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Workbench requires Docker Compose v2. Go 1.24.3 or newer is required to build Workbench. ```shell -> git clone https://github.com/tmacro/workbench.git +> git clone https://github.com/scality/workbench.git > cd workbench/ > make ``` diff --git a/cmd/util.go b/cmd/util.go index 91f950b..4cdd4a1 100644 --- a/cmd/util.go +++ b/cmd/util.go @@ -8,7 +8,7 @@ import ( "path/filepath" "text/template" - "github.com/tmacro/workbench" + "github.com/scality/workbench" ) func getTemplates() fs.FS { diff --git a/go.mod b/go.mod index fe7fd3c..7acc2f3 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/tmacro/workbench +module github.com/scality/workbench go 1.24.3