Skip to content

Commit

Permalink
Update config for homebrew release. Actions updates
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelattwood committed Mar 22, 2024
1 parent efd7023 commit 4264815
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pushes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
# We're not doing releases, just checks, so we can live without check-latest here
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -34,7 +34,7 @@ jobs:
# docker/setup-buildx-action@v1

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: '1.21'
check-latest: true
Expand All @@ -48,18 +48,25 @@ jobs:
run: |
go vet ./...
- name: Create GitHub App Token
id: token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.NATSIO_ARTIFACT_CROSS_REPO_PUSHER_APP_ID }}
private-key: ${{ secrets.NATSIO_ARTIFACT_CROSS_REPO_PUSHER_PRIVATE_KEY }}
owner: "nats-io"
repositories: "homebrew-nats-tools"

- name: Run GoReleaser
id: goreleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser-pro
# We have seen a couple of bugs, so are locking this for now.
# v1.8.3-pro fixes some issues in brew architecture image variants
# which led to <https://github.com/nats-io/homebrew-nats-tools/issues/9>
version: v1.15.2-pro
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_APP_TOKEN: ${{ steps.token.outputs.token }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
SIGNING_KEY_COSIGN: ${{ secrets.RELEASE_SIGNING_KEY_COSIGN }}
SIGNING_KEY_SSH: ${{ secrets.RELEASE_SIGNING_KEY_SSH }}
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ archives:
# '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
name_template: '{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
format: zip
rlcp: true
files:
- none*

Expand Down Expand Up @@ -99,6 +98,7 @@ brews:
repository:
owner: nats-io
name: homebrew-nats-tools
token: "{{ .Env.GITHUB_APP_TOKEN }}"
url_template: 'https://github.com/nats-io/nsc/releases/download/{{ .Tag }}/nsc-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}.zip'
homepage: "https://github.com/nats-io/nsc"
description: "A tool for creating NATS account and user access configurations"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/nats-io/nsc/v2

go 1.20
go 1.21

require (
github.com/blang/semver v3.5.1+incompatible
Expand Down

0 comments on commit 4264815

Please sign in to comment.