diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1881c31..11fa105 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: "1.24" + go-version: "1.25" - name: Download dependencies run: go mod download @@ -41,10 +41,10 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: "1.24" + go-version: "1.25" - name: Download dependencies run: go mod download - name: Run tests - run: make test \ No newline at end of file + run: make test diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index cacaa6d..9dd3a95 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -63,7 +63,7 @@ jobs: if: matrix.language == 'go' uses: actions/setup-go@v6 with: - go-version: "1.24" + go-version: "1.25" # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -89,4 +89,4 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 with: - category: "/language:${{matrix.language}}" \ No newline at end of file + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bec2773..e327047 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ permissions: jobs: build-all-platforms: - runs-on: mac-mini-org-heart + runs-on: macos-15 outputs: version: ${{ steps.build-vars.outputs.version }} @@ -29,7 +29,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: "1.24" + go-version: "1.25" cache: false - name: Resolve release tag @@ -124,6 +124,10 @@ jobs: create-release: needs: build-all-platforms runs-on: ubuntu-latest + outputs: + body: ${{ steps.release-info.outputs.body }} + html_url: ${{ steps.release-info.outputs.html_url }} + tag_name: ${{ steps.release-info.outputs.tag_name }} steps: - name: Download artifacts @@ -147,6 +151,21 @@ jobs: prerelease: ${{ contains(needs.build-all-platforms.outputs.version, '-rc') }} token: ${{ secrets.GITHUB_TOKEN }} + - name: Get release info + id: release-info + uses: actions/github-script@v7 + with: + script: | + const release_id = Number('${{ steps.create-release.outputs.id }}'); + const { data } = await github.rest.repos.getRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id + }); + core.setOutput('body', data.body || ''); + core.setOutput('html_url', data.html_url); + core.setOutput('tag_name', data.tag_name); + push-docker-image: name: Build Docker image and push to registry needs: @@ -238,3 +257,23 @@ jobs: org.opencontainers.image.version=${{ steps.release-version.outputs.RELEASE_VERSION }} org.opencontainers.image.revision=${{ github.sha }} + notify: + needs: + - build-all-platforms + - create-release + - push-docker-image + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Notify Slack (workflow result) + uses: ravsamhq/notify-slack-action@v2 + with: + status: ${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && 'failure' || 'success' }} + notification_title: "${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && '❌' || '✅' }} {workflow} {repo}" + message_format: | + *Release:* <${{ needs.create-release.outputs.html_url }}|${{ needs.create-release.outputs.tag_name || 'none' }}> + *Description:* + ${{ needs.create-release.outputs.body || 'no changes, build skipped' }} + footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Workflow Run>" + env: + SLACK_WEBHOOK_URL: ${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && secrets.SLACK_WEBHOOK_URL_ALERTS || secrets.SLACK_WEBHOOK_URL_RELEASE_TRAIN }} diff --git a/CLAUDE.md b/CLAUDE.md index 1313edf..00bc402 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -38,7 +38,7 @@ make build-windows-amd64 - **CGO**: The build requires CGO_ENABLED=1 due to tantivy (full-text search library) dependencies - **Tantivy Library**: Automatically downloaded for your platform during `make build` - **C Compiler**: Required for CGO and linking tantivy library (clang on macOS, gcc on Linux, mingw on Windows) -- **Go 1.24+**: Required for building the project +- **Go 1.25+**: Required for building the project ## Development Workflow @@ -221,4 +221,4 @@ func NewConfigCmd() *cobra.Command { ## Code Style Guidelines ### Naming Conventions -- **Use `Id` instead of `ID`**: Throughout the codebase, prefer `Id` over `ID` for consistency (e.g., `UserId`, `SpaceId`, `ObjectId`) \ No newline at end of file +- **Use `Id` instead of `ID`**: Throughout the codebase, prefer `Id` over `ID` for consistency (e.g., `UserId`, `SpaceId`, `ObjectId`) diff --git a/Dockerfile b/Dockerfile index 9ad2950..64cc233 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # ============================================================================= # Build stage # ============================================================================= -FROM golang:1.24-alpine AS builder +FROM golang:1.25-alpine AS builder WORKDIR /app diff --git a/README.md b/README.md index b8c5651..ad047b2 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ anytype-cli/ #### Prerequisites -- Go 1.24 or later +- Go 1.25 or later - Git - Make - C compiler (gcc or clang, for CGO) diff --git a/go.mod b/go.mod index 8f0392b..7804f8a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/anyproto/anytype-cli -go 1.24.6 +go 1.25 require ( github.com/anyproto/any-sync v0.11.14