From 7779280840c9e221c4a47e71cfcdcfe49347884c Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Wed, 11 Mar 2026 21:53:00 +0000 Subject: [PATCH 1/3] ci: add test/lint workflow and private module auth --- .github/workflows/ci.yaml | 54 ++++++++++++++++++++++++++++++++++ .github/workflows/release.yaml | 4 +++ 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..6419b81 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Check goimports + run: | + go install golang.org/x/tools/cmd/goimports@latest + diff <(goimports -l .) <(echo -n) + + - name: Run staticcheck + run: | + go install honnef.co/go/tools/cmd/staticcheck@latest + staticcheck ./... + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Run tests + run: go test -race -v ./... + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Build + run: go build -v ./... diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1487557..c440d49 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,6 +20,10 @@ jobs: with: go-version-file: go.mod + - name: Configure private modules + run: git config --global url."https://${{ secrets.GO_MODULE_PAT }}@github.com/".insteadOf "https://github.com/" + if: ${{ secrets.GO_MODULE_PAT != '' }} + - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro From e64fff9e99db56e2d47acdb379f34e942cd573f9 Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Wed, 11 Mar 2026 21:53:35 +0000 Subject: [PATCH 2/3] ci: add CI workflow (tests, goimports, staticcheck, build) and fix release auth --- .github/workflows/ci.yaml | 12 ++++++++++++ .github/workflows/release.yaml | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6419b81..8be37d0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,6 +9,9 @@ on: permissions: contents: read +env: + GOPRIVATE: github.com/taigrr/* + jobs: lint: runs-on: ubuntu-latest @@ -19,6 +22,9 @@ jobs: with: go-version-file: go.mod + - name: Configure private modules + run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf "https://github.com/" + - name: Check goimports run: | go install golang.org/x/tools/cmd/goimports@latest @@ -38,6 +44,9 @@ jobs: with: go-version-file: go.mod + - name: Configure private modules + run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf "https://github.com/" + - name: Run tests run: go test -race -v ./... @@ -50,5 +59,8 @@ jobs: with: go-version-file: go.mod + - name: Configure private modules + run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf "https://github.com/" + - name: Build run: go build -v ./... diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c440d49..8e7775f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,6 +8,9 @@ on: permissions: contents: write +env: + GOPRIVATE: github.com/taigrr/* + jobs: release: runs-on: ubuntu-latest @@ -21,8 +24,7 @@ jobs: go-version-file: go.mod - name: Configure private modules - run: git config --global url."https://${{ secrets.GO_MODULE_PAT }}@github.com/".insteadOf "https://github.com/" - if: ${{ secrets.GO_MODULE_PAT != '' }} + run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf "https://github.com/" - uses: goreleaser/goreleaser-action@v6 with: From 138075a205235d9951037333817c71bc5b9d73e0 Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Wed, 11 Mar 2026 21:54:45 +0000 Subject: [PATCH 3/3] ci: remove private module workarounds (signalcli is public now) --- .github/workflows/ci.yaml | 12 ------------ .github/workflows/release.yaml | 6 ------ 2 files changed, 18 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8be37d0..6419b81 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,9 +9,6 @@ on: permissions: contents: read -env: - GOPRIVATE: github.com/taigrr/* - jobs: lint: runs-on: ubuntu-latest @@ -22,9 +19,6 @@ jobs: with: go-version-file: go.mod - - name: Configure private modules - run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf "https://github.com/" - - name: Check goimports run: | go install golang.org/x/tools/cmd/goimports@latest @@ -44,9 +38,6 @@ jobs: with: go-version-file: go.mod - - name: Configure private modules - run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf "https://github.com/" - - name: Run tests run: go test -race -v ./... @@ -59,8 +50,5 @@ jobs: with: go-version-file: go.mod - - name: Configure private modules - run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf "https://github.com/" - - name: Build run: go build -v ./... diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8e7775f..1487557 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,9 +8,6 @@ on: permissions: contents: write -env: - GOPRIVATE: github.com/taigrr/* - jobs: release: runs-on: ubuntu-latest @@ -23,9 +20,6 @@ jobs: with: go-version-file: go.mod - - name: Configure private modules - run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf "https://github.com/" - - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro