Release #21
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Release tag (e.g., v1.0.0)' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set release tag | |
| id: set-tag | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| TAG="${{ github.event.inputs.tag }}" | |
| echo "Creating tag $TAG" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag "$TAG" | |
| git push origin "$TAG" | |
| else | |
| TAG="${{ github.ref_name }}" | |
| fi | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.7" | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: Verify root module | |
| run: | | |
| go mod download | |
| go mod tidy | |
| git diff --exit-code go.mod go.sum | |
| go build ./... | |
| go test -race -count=1 ./... | |
| - name: Verify driver sub-modules | |
| run: | | |
| for mod in pgdriver mysqldriver sqlitedriver mongodriver tursodriver clickhousedriver esdriver; do | |
| echo "::group::Verifying $mod" | |
| cd "drivers/$mod" | |
| go mod download | |
| go mod tidy | |
| git diff --exit-code go.mod go.sum | |
| go build ./... | |
| go test -race -count=1 ./... | |
| cd ../.. | |
| echo "::endgroup::" | |
| done | |
| - name: Verify extension module | |
| working-directory: extension | |
| run: | | |
| go mod download | |
| go mod tidy | |
| git diff --exit-code go.mod go.sum | |
| go build ./... | |
| - name: Verify KV module | |
| working-directory: kv | |
| run: | | |
| go mod download | |
| go mod tidy | |
| git diff --exit-code go.mod go.sum | |
| go build ./... | |
| go test -race -count=1 ./... | |
| - name: Verify KV extension module | |
| working-directory: kv/extension | |
| run: | | |
| go mod download | |
| go mod tidy | |
| git diff --exit-code go.mod go.sum | |
| go build ./... | |
| - name: Verify KV driver sub-modules | |
| run: | | |
| for mod in badgerdriver boltdriver dynamodriver memcacheddriver redisdriver; do | |
| echo "::group::Verifying kv/drivers/$mod" | |
| cd "kv/drivers/$mod" | |
| go mod download | |
| go mod tidy | |
| git diff --exit-code go.mod go.sum | |
| go build ./... | |
| go test -race -count=1 ./... | |
| cd ../../.. | |
| echo "::endgroup::" | |
| done | |
| - name: Tag sub-modules | |
| run: | | |
| TAG="${{ steps.set-tag.outputs.tag }}" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| # Tag all driver sub-modules | |
| for mod in pgdriver mysqldriver sqlitedriver mongodriver tursodriver clickhousedriver esdriver; do | |
| MOD_TAG="drivers/$mod/$TAG" | |
| echo "Tagging $MOD_TAG" | |
| git tag "$MOD_TAG" | |
| git push origin "$MOD_TAG" | |
| done | |
| # Tag extension sub-module | |
| EXT_TAG="extension/$TAG" | |
| echo "Tagging $EXT_TAG" | |
| git tag "$EXT_TAG" | |
| git push origin "$EXT_TAG" | |
| # Tag KV sub-module | |
| KV_TAG="kv/$TAG" | |
| echo "Tagging $KV_TAG" | |
| git tag "$KV_TAG" | |
| git push origin "$KV_TAG" | |
| # Tag KV extension sub-module | |
| KV_EXT_TAG="kv/extension/$TAG" | |
| echo "Tagging $KV_EXT_TAG" | |
| git tag "$KV_EXT_TAG" | |
| git push origin "$KV_EXT_TAG" | |
| # Tag all KV driver sub-modules | |
| for mod in badgerdriver boltdriver dynamodriver memcacheddriver redisdriver; do | |
| MOD_TAG="kv/drivers/$mod/$TAG" | |
| echo "Tagging $MOD_TAG" | |
| git tag "$MOD_TAG" | |
| git push origin "$MOD_TAG" | |
| done | |
| - name: Generate release notes | |
| id: notes | |
| run: | | |
| PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") | |
| if [ -z "$PREV_TAG" ]; then | |
| NOTES=$(git log --pretty=format:"- %s (%h)" HEAD) | |
| else | |
| NOTES=$(git log --pretty=format:"- %s (%h)" ${PREV_TAG}..HEAD) | |
| fi | |
| { | |
| echo "notes<<EOF" | |
| echo "$NOTES" | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.set-tag.outputs.tag }} | |
| body: | | |
| ## Changes | |
| ${{ steps.notes.outputs.notes }} | |
| --- | |
| ### Installation | |
| ```bash | |
| go get github.com/xraph/grove@${{ steps.set-tag.outputs.tag }} | |
| ``` | |
| Driver sub-modules: | |
| ```bash | |
| go get github.com/xraph/grove/drivers/pgdriver@${{ steps.set-tag.outputs.tag }} | |
| go get github.com/xraph/grove/drivers/mysqldriver@${{ steps.set-tag.outputs.tag }} | |
| go get github.com/xraph/grove/drivers/sqlitedriver@${{ steps.set-tag.outputs.tag }} | |
| go get github.com/xraph/grove/drivers/mongodriver@${{ steps.set-tag.outputs.tag }} | |
| go get github.com/xraph/grove/drivers/tursodriver@${{ steps.set-tag.outputs.tag }} | |
| go get github.com/xraph/grove/drivers/clickhousedriver@${{ steps.set-tag.outputs.tag }} | |
| go get github.com/xraph/grove/drivers/esdriver@${{ steps.set-tag.outputs.tag }} | |
| ``` | |
| Forge extension: | |
| ```bash | |
| go get github.com/xraph/grove/extension@${{ steps.set-tag.outputs.tag }} | |
| ``` | |
| KV store: | |
| ```bash | |
| go get github.com/xraph/grove/kv@${{ steps.set-tag.outputs.tag }} | |
| ``` | |
| KV Forge extension: | |
| ```bash | |
| go get github.com/xraph/grove/kv/extension@${{ steps.set-tag.outputs.tag }} | |
| ``` | |
| KV driver sub-modules: | |
| ```bash | |
| go get github.com/xraph/grove/kv/drivers/badgerdriver@${{ steps.set-tag.outputs.tag }} | |
| go get github.com/xraph/grove/kv/drivers/boltdriver@${{ steps.set-tag.outputs.tag }} | |
| go get github.com/xraph/grove/kv/drivers/dynamodriver@${{ steps.set-tag.outputs.tag }} | |
| go get github.com/xraph/grove/kv/drivers/memcacheddriver@${{ steps.set-tag.outputs.tag }} | |
| go get github.com/xraph/grove/kv/drivers/redisdriver@${{ steps.set-tag.outputs.tag }} | |
| ``` | |
| generate_release_notes: true |