Install
You can install the pre-compiled binary (in several ways), use Docker or compile from source.
Below you can find the steps for each of them.
Using a package manager
brew install goreleaser/tap/nfpmbrew install nfpmInfo
The formula in homebrew-core might be slightly outdated. Use our homebrew tap to always get the latest updates.
scoop bucket add goreleaser https://github.com/goreleaser/scoop-bucket.git
scoop install nfpmecho 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list
sudo apt update
sudo apt install nfpmecho '[goreleaser]
name=GoReleaser
baseurl=https://repo.goreleaser.com/yum/
enabled=1
gpgcheck=0' | sudo tee /etc/yum.repos.d/goreleaser.repo
sudo yum install nfpmwinget install --id=goreleaser.nfpmnpm install -g @goreleaser/nfpm
# or
npx @goreleaser/nfpmPre-built packages and archives
Download the your format of choice from the releases and install them with the appropriate tools.
You may also download the archives and extract and run the binary inside.
Running with Docker
You can also use it within a Docker container. To do that, you’ll need to execute something more-or-less like the following:
docker run --rm -v $PWD:/tmp -w /tmp goreleaser/nfpm package \
--config /tmp/pkg/foo.yml \
--target /tmp \
--packager debUsing go install
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latestVerifying the artifacts
All artifacts are checksummed, and the checksum is signed with cosign.
Download
Download the files you want, the checksums.txt and checksums.txt.sig files
from the releases page:
wget 'https://github.com/goreleaser/nfpm/releases/download/v2.43.4/checksums.txt'Verify the signature
wget 'https://github.com/goreleaser/nfpm/releases/download/v2.43.4/checksums.txt.sigstore.json'
cosign verify-blob \
--certificate-identity 'https://github.com/goreleaser/nfpm/.github/workflows/release.yml@refs/tags/v2.43.4' \
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
--bundle "checksums.txt.sigstore.json" \
checksums.txtVerify the checksums
If the signature is valid, you can then verify the SHA256 sums match with the downloaded binary:
sha256sum --ignore-missing -c checksums.txtOur Docker images are signed with cosign.
Building from source
Here you have two options:
If you want to contribute to the project, please follow the steps on our contributing guide.
If you just want to build from source for whatever reason, follow these steps:
clone:
git clone https://github.com/goreleaser/nfpm
cd nfpmget the dependencies:
go mod tidybuild:
go build -o nfpm ./cmd/nfpmverify it works:
./nfpm --version