docs: update to v1.4.2-2026-04-07 #305
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: commit | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| linter: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26.1" | |
| - run: go mod download | |
| - run: go mod verify | |
| - run: go install tool | |
| - uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.11.4 | |
| tests: | |
| name: tests-${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| # Check on all supported GitHub Actions OS | |
| # https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories | |
| # https://github.com/actions/runner-images | |
| # https://github.com/actions/partner-runner-images | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-22.04 | |
| - ubuntu-24.04 | |
| - ubuntu-22.04-arm | |
| - ubuntu-24.04-arm | |
| - windows-2022 | |
| - windows-2025 | |
| - macos-14 | |
| - macos-15 | |
| - macos-26 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26.1" | |
| - run: go mod download | |
| - run: go test -v ./... -coverprofile=./coverage.txt -covermode=atomic -coverpkg=./... | |
| - name: Archive code coverage results | |
| if: matrix.os == 'ubuntu-24.04' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: code-coverage | |
| path: coverage.txt | |
| code_coverage: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-24.04 | |
| needs: tests | |
| permissions: | |
| contents: read | |
| actions: read | |
| pull-requests: write # write permission needed to comment on PR | |
| steps: | |
| - uses: fgrosse/go-coverage-report@v1.2.0 | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # Required for goreleaser to get git history | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26.1" | |
| - name: Set up QEMU for cross-compilation of Docker images | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Fix Segmentation fault of QEMU - https://github.com/docker/buildx/issues/1170 | |
| run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes -c yes | |
| - run: go mod download | |
| - run: go install tool | |
| - run: go generate ./... | |
| - name: Check for modified files | |
| run: | | |
| if ! git diff --quiet; then | |
| echo "Error: Running 'go generate' modified files. Please commit these changes:" | |
| git diff | |
| exit 1 | |
| fi | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| id: goreleaser | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| args: release --skip=publish --clean --snapshot | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Test build Docker image (stage-bin) | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: false | |
| platforms: | | |
| linux/arm64 | |
| linux/amd64 | |
| target: stage-bin | |
| tags: test-build-bin | |
| build-args: | | |
| VERSION=${{ fromJSON(steps.goreleaser.outputs.metadata).version }} | |
| COMMIT=${{ fromJSON(steps.goreleaser.outputs.metadata).commit }} | |
| COMMIT_DATE=${{ fromJSON(steps.goreleaser.outputs.metadata).date }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Test build Docker image (stage-release-all-in-one) | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: false | |
| platforms: | | |
| linux/arm64 | |
| linux/amd64 | |
| target: stage-release-all-in-one | |
| tags: test-build-release | |
| build-args: | | |
| VERSION=${{ fromJSON(steps.goreleaser.outputs.metadata).version }} | |
| COMMIT=${{ fromJSON(steps.goreleaser.outputs.metadata).commit }} | |
| COMMIT_DATE=${{ fromJSON(steps.goreleaser.outputs.metadata).date }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| nix-build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-24.04 | |
| - ubuntu-24.04-arm | |
| - macos-15 | |
| - macos-26 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: DeterminateSystems/nix-installer-action@main | |
| with: | |
| determinate: false | |
| - uses: DeterminateSystems/magic-nix-cache-action@v13 | |
| with: | |
| use-flakehub: false | |
| - name: Check flake | |
| run: nix flake check --print-build-logs | |
| - name: Build package | |
| run: nix build -L .#default | |
| - name: Run binary version check | |
| run: ./result/bin/any-sync-bundle --version | |
| nix-devshell: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: DeterminateSystems/nix-installer-action@main | |
| with: | |
| determinate: false | |
| - uses: DeterminateSystems/magic-nix-cache-action@v13 | |
| with: | |
| use-flakehub: false | |
| - name: Check dev shell | |
| run: | | |
| nix develop --command go version | |
| nix develop --command golangci-lint version | |
| nix develop --command goreleaser --version | |
| integration-test: | |
| name: integration-test | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26.1" | |
| - run: go mod download | |
| - name: Run integration tests | |
| run: go test -v -tags=integration -timeout=10m ./integration/... |