diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d7d8a5d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Release +on: + push: + tags: ["v[0-9]+.[0-9]+.[0-9]+*"] + workflow_dispatch: +jobs: + create_release: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - uses: mindsers/changelog-reader-action@v2 + id: changelog_reader + with: + version: ${{ github.ref_name }} + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + name: ${{ github.ref_name }} + body: ${{ steps.changelog_reader.outputs.changes }} + - name: Refresh docs + run: curl https://sum.golang.org/lookup/github.com/s2-streamstore/s2-sdk-go@${{ github.ref_name }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..09181c6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,26 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## [0.1.0] - 2025-01-10 + +### Features + +- Add retry support +- Add more connection params ([#5](https://github.com/s2-streamstore/s2-sdk-go/issues/5)) +- Support read session resumption ([#7](https://github.com/s2-streamstore/s2-sdk-go/issues/7)) +- Append record batching ([#8](https://github.com/s2-streamstore/s2-sdk-go/issues/8)) + +### Documentation + +- Add documentation comments for exported functions/types ([#11](https://github.com/s2-streamstore/s2-sdk-go/issues/11)) +- Package level documentation ([#12](https://github.com/s2-streamstore/s2-sdk-go/issues/12)) +- Add examples ([#13](https://github.com/s2-streamstore/s2-sdk-go/issues/13)) +- README ([#16](https://github.com/s2-streamstore/s2-sdk-go/issues/16)) + +### Miscellaneous Tasks + +- Update starwars example with flags ([#4](https://github.com/s2-streamstore/s2-sdk-go/issues/4)) +- Add github actions for CI ([#6](https://github.com/s2-streamstore/s2-sdk-go/issues/6)) +- *(refactor)* Rearrange files ([#15](https://github.com/s2-streamstore/s2-sdk-go/issues/15)) + diff --git a/Taskfile.yml b/Taskfile.yml index ee738a9..811b62b 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -136,3 +136,18 @@ tasks: - .out/sync-docs cmds: - go build -o .out/sync-docs ./internal/sync-docs/*.go + + release:prepare: + requires: + vars: [VERSION] + cmds: + - git cliff --unreleased --tag v{{.VERSION}} --prepend CHANGELOG.md + + release:tag: + requires: + vars: [VERSION] + cmds: + - git switch main + - git pull origin main + - git tag v{{.VERSION}} + - echo "Push the tag 'v{{.VERSION}}' to release"