From daac70bba204fd345d136bac1738f6476166f859 Mon Sep 17 00:00:00 2001 From: "F. Talha Altinel" Date: Mon, 23 Dec 2024 23:53:00 +0000 Subject: [PATCH] go releaser config --- .github/workflows/releaser.yaml | 33 +++++++++++++++++++++++++ .goreleaser.yaml | 44 +++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 .github/workflows/releaser.yaml create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/releaser.yaml b/.github/workflows/releaser.yaml new file mode 100644 index 0000000..9b44617 --- /dev/null +++ b/.github/workflows/releaser.yaml @@ -0,0 +1,33 @@ +on: + push: + branches: [main] + tags: + - 'v*' + +name: GoReleaser +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: 1.23 + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Fetch all tags + run: git fetch --force --tags + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v3 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..f01d4d9 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,44 @@ +project_name: Laverna + +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm64 + ignore: + - goos: windows + goarch: arm64 + +checksum: + name_template: "{{ .ProjectName }}-{{ .Version }}-checksums.sha256" + +nfpms: + - maintainer: F. Talha Altinel + description: CLI for language learners + homepage: https://github.com/lingua-sensei/laverna + license: MIT + formats: + - deb + - rpm + - apk + +archives: + - name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}" + format_overrides: + - goos: windows + format: zip + +changelog: + sort: "asc" + filters: + exclude: + - "^docs:" + - "^test:" + - "^chore:" + - "Merge pull request" + - "Merge branch" \ No newline at end of file