Skip to content

Commit 08e09b8

Browse files
authored
Add config to publish Nix packages (#581)
Signed-off-by: Luca Comellini <[email protected]>
1 parent 1d865ff commit 08e09b8

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ jobs:
165165
mkdir -p $HOME/.cache/snapcraft/stage-packages
166166
if: github.ref_type == 'tag'
167167

168+
- name: Install Nix
169+
uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
170+
with:
171+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
172+
if: github.ref_type == 'tag'
173+
168174
- name: Run GoReleaser
169175
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
170176
with:
@@ -173,7 +179,7 @@ jobs:
173179
env:
174180
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
175181
GOPATH: ${{ steps.go.outputs.go_path }}
176-
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.NGINX_PAT }}
182+
NGINX_GITHUB_TOKEN: ${{ secrets.NGINX_PAT }}
177183
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_COMMUNITY }}
178184
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }}
179185

.goreleaser.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ brews:
5858
- repository:
5959
owner: nginxinc
6060
name: homebrew-tap
61-
token: '{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}'
61+
token: '{{ .Env.NGINX_GITHUB_TOKEN }}'
6262
folder: Formula
63-
homepage: https://www.nginx.com/
63+
homepage: https://github.com/nginxinc/nginx-prometheus-exporter
6464
description: NGINX Prometheus Exporter for NGINX and NGINX Plus
6565
license: Apache-2.0
6666
commit_author:
@@ -113,3 +113,18 @@ snapcrafts:
113113
plugs: ["network", "network-bind"]
114114
completer: completions/nginx-prometheus-exporter.bash
115115
disable: "{{ if .IsSnapshot }}true{{ end }}"
116+
117+
nix:
118+
- repository:
119+
owner: nginxinc
120+
name: nur
121+
token: '{{ .Env.NGINX_GITHUB_TOKEN }}'
122+
homepage: https://github.com/nginxinc/nginx-prometheus-exporter
123+
description: NGINX Prometheus Exporter for NGINX and NGINX Plus
124+
license: asl20
125+
commit_author:
126+
name: nginx-bot
127+
128+
extra_install: |-
129+
installManPage ./manpages/nginx-prometheus-exporter.1.gz
130+
installShellCompletion ./completions/*

0 commit comments

Comments
 (0)