Skip to content

Commit

Permalink
install lib postal
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Jul 5, 2024
1 parent aec6895 commit b5a2c9d
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 6 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,23 @@ jobs:

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
if: ${{ matrix.os == 'ubuntu-latest' }}
# if: success() && startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean --skip=publish --snapshot -f .goreleaser.linux.yml
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
# GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
if: ${{ matrix.os == 'macos-latest' }}
# if: success() && startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean --skip=publish --snapshot
args: release --clean --skip=publish --snapshot -f .goreleaser.macos.yml
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
Expand Down
81 changes: 81 additions & 0 deletions .goreleaser.linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# This is an example .goreleaser.yml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
builds:
- id: postal-server-build
binary: postal_server
env:
- CGO_ENABLED=1
goos:
- linux
goarch:
- "386"
- amd64
- arm
- arm64
goarm:
- "7"
flags:
- -trimpath
ldflags:
- -s -w
- -X github.com/le0pard/postal_server/version.Version={{.Version}}
- -X github.com/le0pard/postal_server/version.GitCommit={{.Commit}}
- -X github.com/le0pard/postal_server/version.BuildTime={{.Date}}

archives:
- id: postal-server-archive
builds:
- postal-server-build
name_template: >-
postal_server_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
format: zip

checksum:
name_template: 'checksums.txt'

# snapshot:
# name_template: "{{ .Tag }}"

# signs:
# - artifacts: checksum
# args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]

sboms:
- artifacts: archive

# changelog:
# sort: asc
# use: github
# filters:
# exclude:
# - '^docs:'
# - '^test:'

# brews:
# -
# name: certonid
# ids:
# - certonid-archive
# goarm: "7"
# # GitHub/GitLab repository to push the formula to
# repository:
# owner: certonid
# name: homebrew-tap
# branch: main
# token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"

# commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
# directory: Formula
# homepage: "https://github.com/certonid/certonid"
# description: "Serverless SSH Certificate Authority"
# license: "MIT"
# test: |
# system "#{bin}/certonid", "--version"
# install: |
# bin.install "certonid"
5 changes: 0 additions & 5 deletions .goreleaser.yml → .goreleaser.macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ builds:
env:
- CGO_ENABLED=1
goos:
{{- if eq .Os "linux" }}
- linux
{{- end }}
{{- if eq .Os "darwin" }}
- darwin
{{- end }}
goarch:
- "386"
- amd64
Expand Down

0 comments on commit b5a2c9d

Please sign in to comment.