Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/actions/create-release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'Create GitHub Release'
description: 'Creates a GitHub release with installation instructions'

inputs:
tag:
description: 'The git tag for the release'
required: true
version:
description: 'The version number'
required: true
repository:
description: 'The GitHub repository (owner/name)'
required: true

runs:
using: 'composite'
steps:
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ inputs.tag }}
name: Release ${{ inputs.version }}
body: |
## Installation

To use this version in your Go project, run:

```bash
go get github.com/${{ inputs.repository }}@${{ inputs.tag }}
```

Or add it to your `go.mod`:

```go
require github.com/${{ inputs.repository }} ${{ inputs.tag }}
```
generateReleaseNotes: true
draft: false
prerelease: false
32 changes: 32 additions & 0 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,35 @@ jobs:
run: |
go generate ./...
go test ./pkg/... ./internal/... --tags=postgres

verify-examples:
name: Run example ${{ matrix.example }}
runs-on: ubuntu-latest
strategy:
matrix:
example:
- sync-pull-dataplane
- streaming-pull-dataplane
- streaming-push-dataplane
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true

- name: Go env
run: |
go env
go version

- name: Run example
working-directory: examples/${{ matrix.example }}
run: |
go build .
go run .


21 changes: 20 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,23 @@ jobs:
- name: Create and push tag
uses: ./.github/actions/create-tag
with:
tag: ${{ steps.normalize_version.outputs.tag }}
tag: ${{ steps.normalize_version.outputs.tag }}

create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: create-tag

permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create GitHub Release
uses: ./.github/actions/create-release
with:
tag: ${{ needs.create-tag.outputs.tag }}
version: ${{ needs.create-tag.outputs.version }}
repository: ${{ github.repository }}
17 changes: 3 additions & 14 deletions .github/workflows/release_bugfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,8 @@ jobs:

steps:
- name: Create GitHub Release
uses: ncipollo/release-action@v1
uses: ./.github/actions/create-release
with:
tag: ${{ needs.create-tag.outputs.tag }}
name: Release ${{ needs.create-tag.outputs.tag }}
generateReleaseNotes: true
makeLatest: ${{ needs.create-tag.outputs.is_latest == 'true' }}
body: |
NuGet packages published to GitHub Packages.

### Installation
```bash
dotnet add package DataPlane.Sdk.Core --version ${{ needs.create-tag.outputs.version }}
dotnet add package DataPlane.Sdk.Api --version ${{ needs.create-tag.outputs.version }}
```
draft: false
prerelease: false
version: ${{ needs.create-tag.outputs.version }}
repository: ${{ github.repository }}