Skip to content

Commit

Permalink
Merge pull request #295 from arran4/goreleaser-improvements
Browse files Browse the repository at this point in the history
Goreleaser improvements
  • Loading branch information
rusq authored Jul 6, 2024
2 parents 642363e + f65672d commit 30c1145
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: '>=1.19.5'
cache: true
# More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs.
- uses: goreleaser/goreleaser-action@v4
- uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32 changes: 30 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
version: 2
project_name: slackdump
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
builds:
- env:
- id: slackdump
env:
- CGO_ENABLED=0
goos:
- linux
Expand All @@ -17,7 +20,8 @@ builds:
main: ./cmd/slackdump

archives:
- format: tar.gz
- id: default
format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
Expand All @@ -30,6 +34,10 @@ archives:
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.rst
- slackdump.1
checksum:
name_template: 'checksums.txt'
snapshot:
Expand All @@ -41,6 +49,26 @@ changelog:
- '^docs:'
- '^test:'

nfpms:
-
vendor: Rustam
homepage: https://github.com/rusq
maintainer: Rustam <[email protected]>
description: Save or export your private and public Slack messages, threads, files, and users locally without admin privileges.
license: GPL-3.0
formats:
- apk
- deb
- rpm
- termux.deb
- archlinux
release: 1
section: default
priority: extra
contents:
- src: ./slackdump.1
dst: /usr/share/man/man1/slackdump.1

# 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
Expand Down

0 comments on commit 30c1145

Please sign in to comment.