diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 381b173..1f466e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,4 @@ -on: - release: - types: [published] +on: {} jobs: releases-matrix: name: Release Go Binaries diff --git a/.github/workflows/releasev2.yml b/.github/workflows/releasev2.yml new file mode 100644 index 0000000..d39ce9e --- /dev/null +++ b/.github/workflows/releasev2.yml @@ -0,0 +1,35 @@ +name: goreleaser + +on: + push: + # run only against tags + tags: + - '*' + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - run: git fetch --force --tags + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.19 + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v4 + with: + distribution: goreleaser + version: latest + args: release --clean --release-notes=${{ github.event.release.body }} --skip-validate --debug + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 5f50247..60538c2 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ target-jsonl-blob # Dependency directories (remove the comment below to include it) # vendor/ + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..2c909c0 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,52 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +before: + hooks: + - go mod tidy + - go mod download + +builds: +- env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + goarch: + - "386" + - "amd64" + - "arm64" + +archives: +- format_overrides: + - goos: windows + format: zip + +release: + github: + owner: MeltanoLabs + name: target-jsonl-blob + prerelease: auto + +brews: +- tap: + owner: miniscruff + name: changie + homepage: https://github.com/MeltanoLabs/target-jsonl-blob + description: JSONL Singer target for local storage, S3 and Azure Blob Storage. + license: Apache-2.0 + skip_upload: auto + +checksum: + name_template: 'checksums.txt' + +snapshot: + name_template: "{{ .Tag }}-next" + +changelog: + skip: false + +# The lines beneath this are called `modelines`. See `:help modeline` +# Feel free to remove those if you don't want/use them. +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj