From cd3a462480332723fa03f19f1234ff65f3de63b6 Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Sat, 11 Apr 2026 12:08:12 -0500 Subject: [PATCH 01/10] Update Releaser Config --- .goreleaser.yaml | 15 ++++++++++++++- cmd/usb.go | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b026716..dec5390 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,4 +1,17 @@ +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=jcroql +version: 2 builds: - env: [CGO_ENABLED=0] goos: [linux, windows, darwin] - goarch: [amd64, arm64] \ No newline at end of file + goarch: [amd64, arm64] +archives: + - # + # ID of this archive. + # + # Default: 'default'. + id: default + format_overrides: + - # Which GOOS to override the format for. + goos: windows + formats: ["zip"] # Plural form, multiple formats. diff --git a/cmd/usb.go b/cmd/usb.go index 4e40436..bd5ae92 100644 --- a/cmd/usb.go +++ b/cmd/usb.go @@ -4,6 +4,7 @@ import ( "bufio" "fmt" "os" + "strings" "github.com/spf13/cobra" ) @@ -53,7 +54,7 @@ var formatCmd = &cobra.Command{ reader := bufio.NewReader(os.Stdin) text, _ := reader.ReadString('\n') - if text != "yes\n" { + if strings.ToLower(text) != "yes\n" { fmt.Println("Aborted.") return nil } From 3f93e66ea8643aaa0489c95f97845fcd74c79572 Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Sat, 11 Apr 2026 12:09:57 -0500 Subject: [PATCH 02/10] not tags --- .github/workflows/go.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f8d150c..74b2326 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,6 +1,11 @@ name: Go -on: [push] +on: + push: + branches: + - '**' + tags-ignore: + - '**' jobs: build: From e5803b4c8e00f75ea0cdcce8d62a5698fbe0067e Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Sat, 11 Apr 2026 12:13:55 -0500 Subject: [PATCH 03/10] try this --- .goreleaser.yaml | 60 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 13 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index dec5390..c7fad85 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,17 +1,51 @@ -# yaml-language-server: $schema=https://goreleaser.com/static/schema.json -# vim: set ts=2 sw=2 tw=0 fo=jcroql version: 2 + +project_name: rioctl + +before: + hooks: + - go mod tidy + builds: - - env: [CGO_ENABLED=0] - goos: [linux, windows, darwin] - goarch: [amd64, arm64] + - id: rioctl + binary: rioctl + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm64 + archives: - - # - # ID of this archive. - # - # Default: 'default'. - id: default + - id: default + builds: + - rioctl format_overrides: - - # Which GOOS to override the format for. - goos: windows - formats: ["zip"] # Plural form, multiple formats. + - goos: windows + format: zip + name_template: >- + {{ .ProjectName }}_ + {{ .Version }}_ + {{ .Os }}_ + {{ .Arch }} + files: + - LICENSE* + - README* + +checksum: + name_template: 'checksums.txt' + +release: + github: + owner: your-org + name: your-repo + +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' \ No newline at end of file From 3203faf5de2d8b48cf80f1a5d9f654b84f367051 Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Sat, 11 Apr 2026 12:20:45 -0500 Subject: [PATCH 04/10] maybe --- .github/workflows/go.yml | 4 ++-- .goreleaser.yaml | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 74b2326..08d633b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -3,9 +3,9 @@ name: Go on: push: branches: - - '**' + - '*' tags-ignore: - - '**' + - '*' jobs: build: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index c7fad85..cedc478 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -12,12 +12,12 @@ builds: env: - CGO_ENABLED=0 goos: - - linux - - darwin + # - linux + # - darwin - windows goarch: - amd64 - - arm64 + # - arm64 archives: - id: default @@ -38,10 +38,10 @@ archives: checksum: name_template: 'checksums.txt' -release: - github: - owner: your-org - name: your-repo +# release: +# github: +# owner: your-org +# name: your-repo changelog: sort: asc From bbbde6c556ee52edaf384474740375e1b21831fe Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Sat, 11 Apr 2026 12:24:23 -0500 Subject: [PATCH 05/10] maybe --- .github/workflows/go.yml | 5 ++--- .goreleaser.yaml => .goreleaser.yml | 0 2 files changed, 2 insertions(+), 3 deletions(-) rename .goreleaser.yaml => .goreleaser.yml (100%) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 08d633b..50cce3d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -3,9 +3,8 @@ name: Go on: push: branches: - - '*' - tags-ignore: - - '*' + - 'main' + pull_request: jobs: build: diff --git a/.goreleaser.yaml b/.goreleaser.yml similarity index 100% rename from .goreleaser.yaml rename to .goreleaser.yml From 9ac43f6e9d422b2992638a5f7fd3804ab4fb405f Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Sat, 11 Apr 2026 12:36:34 -0500 Subject: [PATCH 06/10] so dumb!!! --- .github/workflows/go.yml | 6 +++++- .github/workflows/release.yml | 2 +- .goreleaser.yml | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 50cce3d..7552c29 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -3,8 +3,12 @@ name: Go on: push: branches: - - 'main' + - main + tags-ignore: + - '**' pull_request: + branches: + - main jobs: build: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5fa4e21..54fbfc8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser # 'latest', 'nightly', or a semver - version: "~> v2" + version: "latest" args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index cedc478..636ee76 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -12,12 +12,12 @@ builds: env: - CGO_ENABLED=0 goos: - # - linux - # - darwin + - linux + - darwin - windows goarch: - amd64 - # - arm64 + - arm64 archives: - id: default @@ -25,7 +25,7 @@ archives: - rioctl format_overrides: - goos: windows - format: zip + formats: ["zip"] name_template: >- {{ .ProjectName }}_ {{ .Version }}_ From 5ff051fe2ef3e8e2f5652a2cd18234575aab4101 Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Sat, 11 Apr 2026 12:43:39 -0500 Subject: [PATCH 07/10] add more CI --- .github/workflows/go.yml | 34 ++++++++++++++++++++++++++-------- .goreleaser.yml | 8 -------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7552c29..62493c9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,7 +11,28 @@ on: - main jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Golangci-lint + uses: golangci/golangci-lint-action@v9 + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: stable + - name: Install dependencies + run: | + go get . + + - name: Test with the Go CLI + run: go test build: + needs: + - lint-test runs-on: ubuntu-latest strategy: matrix: @@ -33,9 +54,6 @@ jobs: run: | go get . - - name: Test with the Go CLI - run: go test - - name: Set Short SHA id: vars run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT @@ -45,8 +63,8 @@ jobs: run: | GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o rioctl-${{ steps.vars.outputs.sha_short }}-${{ matrix.os }}-${{ matrix.arch }} . - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: rioctl-${{ steps.vars.outputs.sha_short }}-${{ matrix.os }}-${{ matrix.arch }} - path: rioctl-${{ steps.vars.outputs.sha_short }}-${{ matrix.os }}-${{ matrix.arch }}* \ No newline at end of file + # - name: Upload Artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: rioctl-${{ steps.vars.outputs.sha_short }}-${{ matrix.os }}-${{ matrix.arch }} + # path: rioctl-${{ steps.vars.outputs.sha_short }}-${{ matrix.os }}-${{ matrix.arch }}* \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml index 636ee76..58e2ba4 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -26,14 +26,6 @@ archives: format_overrides: - goos: windows formats: ["zip"] - name_template: >- - {{ .ProjectName }}_ - {{ .Version }}_ - {{ .Os }}_ - {{ .Arch }} - files: - - LICENSE* - - README* checksum: name_template: 'checksums.txt' From 58fb327dda3716e0d7967180ecad53f9c1dcbddd Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Sat, 11 Apr 2026 12:44:10 -0500 Subject: [PATCH 08/10] nm --- .github/workflows/go.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 62493c9..d7b0e90 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -31,8 +31,6 @@ jobs: - name: Test with the Go CLI run: go test build: - needs: - - lint-test runs-on: ubuntu-latest strategy: matrix: From 655dee05c3866e0459a0f57737b3ca7a53e7a094 Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Sat, 11 Apr 2026 12:50:21 -0500 Subject: [PATCH 09/10] whoops --- .github/workflows/go.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d7b0e90..4e6b599 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,6 +14,10 @@ jobs: lint: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 + with: + go-version: stable - name: Golangci-lint uses: golangci/golangci-lint-action@v9 test: From eff18dbd24adaee5ce2a9c9966d1f2b47a81e9fc Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Sat, 11 Apr 2026 12:54:21 -0500 Subject: [PATCH 10/10] allow fail --- .github/workflows/go.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4e6b599..a35e4ac 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -20,6 +20,7 @@ jobs: go-version: stable - name: Golangci-lint uses: golangci/golangci-lint-action@v9 + continue-on-error: true test: runs-on: ubuntu-latest steps: