Skip to content

Commit

Permalink
add goreleaser (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovromazgon authored Sep 22, 2022
1 parent 0133a51 commit 739591c
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: release

on:
push:
tags:
- v*

permissions:
contents: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
builds:
- main: ./cmd/connector/main.go
goos:
- darwin
- linux
- windows
env:
- CGO_ENABLED=0
ldflags:
- "-s -w -X 'github.com/conduitio-labs/conduit-connector-salesforce.version={{ .Tag }}'"
checksum:
name_template: checksums.txt
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
changelog:
sort: asc
use: github
filters:
exclude:
- '^docs:'
- '^test:'
- '^go.mod:'
- '^.github:'
- Merge branch
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.PHONY: build test lint

VERSION=$(shell git describe --tags --dirty --always)

build:
go build -o conduit-connector-salesforce cmd/sf/main.go
go build -ldflags "-X 'github.com/conduitio-labs/conduit-connector-salesforce.version=${VERSION}'" -o conduit-connector-salesforce cmd/connector/main.go

test:
go test $(GOTEST_FLAGS) -race ./...
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 6 additions & 1 deletion spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ import (
"github.com/miquido/conduit-connector-salesforce/source"
)

// version is set during the build process (i.e. the Makefile).
// It follows Go's convention for module version, where the version
// starts with the letter v, followed by a semantic version.
var version = "v0.0.0-dev"

func Specification() sdk.Specification {
return sdk.Specification{
Name: "salesforce",
Summary: "A Salesforce source plugin for Conduit.",
Description: "The Conduit plugin supporting Salesforce source.",
Version: "v0.1.0",
Version: version,
Author: "Miquido",
DestinationParams: map[string]sdk.Parameter{
//
Expand Down

0 comments on commit 739591c

Please sign in to comment.