diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7d22491..8c8db92 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,6 +5,25 @@ on: - "*" jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # Allow goreleaser to access older tag information. + fetch-depth: 0 + - uses: actions/setup-go@v4 + with: + go-version-file: 'go.mod' + cache: true + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + args: release --rm-dist + env: + # GitHub sets the GITHUB_TOKEN secret automatically. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + publish-docker-image: runs-on: ubuntu-latest steps: diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..9fa1fe5 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,35 @@ +project_name: appclacks-server + +builds: + - binary: appclacks-server + env: + - CGO_ENABLED=0 + flags: + - -mod=vendor + goos: + - windows + - darwin + - linux + - openbsd + goarch: + - amd64 + - arm + - arm64 + goarm: + - 6 + - 7 + ignore: + - goos: openbsd + goarch: arm + - goos: openbsd + goarch: arm64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:'