Skip to content

Commit

Permalink
Add config to publish Nix packages (#581)
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Comellini <[email protected]>
  • Loading branch information
lucacome authored Jan 8, 2024
1 parent 1d865ff commit 08e09b8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ jobs:
mkdir -p $HOME/.cache/snapcraft/stage-packages
if: github.ref_type == 'tag'

- name: Install Nix
uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
if: github.ref_type == 'tag'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
with:
Expand All @@ -173,7 +179,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOPATH: ${{ steps.go.outputs.go_path }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.NGINX_PAT }}
NGINX_GITHUB_TOKEN: ${{ secrets.NGINX_PAT }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_COMMUNITY }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }}

Expand Down
19 changes: 17 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ brews:
- repository:
owner: nginxinc
name: homebrew-tap
token: '{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}'
token: '{{ .Env.NGINX_GITHUB_TOKEN }}'
folder: Formula
homepage: https://www.nginx.com/
homepage: https://github.com/nginxinc/nginx-prometheus-exporter
description: NGINX Prometheus Exporter for NGINX and NGINX Plus
license: Apache-2.0
commit_author:
Expand Down Expand Up @@ -113,3 +113,18 @@ snapcrafts:
plugs: ["network", "network-bind"]
completer: completions/nginx-prometheus-exporter.bash
disable: "{{ if .IsSnapshot }}true{{ end }}"

nix:
- repository:
owner: nginxinc
name: nur
token: '{{ .Env.NGINX_GITHUB_TOKEN }}'
homepage: https://github.com/nginxinc/nginx-prometheus-exporter
description: NGINX Prometheus Exporter for NGINX and NGINX Plus
license: asl20
commit_author:
name: nginx-bot
email: [email protected]
extra_install: |-
installManPage ./manpages/nginx-prometheus-exporter.1.gz
installShellCompletion ./completions/*

0 comments on commit 08e09b8

Please sign in to comment.