Skip to content

Commit

Permalink
chore: Use goreleaser (#31)
Browse files Browse the repository at this point in the history
* ci: Use goreleaser

* Run on tags
  • Loading branch information
edgarrmondragon authored Feb 24, 2023
1 parent 37872cb commit c614a9c
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
on:
release:
types: [published]
on: {}
jobs:
releases-matrix:
name: Release Go Binaries
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/releasev2.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ target-jsonl-blob

# Dependency directories (remove the comment below to include it)
# vendor/

dist/
52 changes: 52 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c614a9c

Please sign in to comment.