diff --git a/.github/workflows/pushes.yaml b/.github/workflows/pushes.yaml index 386be0df..8d1cd87e 100644 --- a/.github/workflows/pushes.yaml +++ b/.github/workflows/pushes.yaml @@ -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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c716ae9c..01caed17 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -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 @@ -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 - 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 }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 633916dc..21eef726 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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* @@ -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" diff --git a/go.mod b/go.mod index 52bea1dc..e27dfe8b 100644 --- a/go.mod +++ b/go.mod @@ -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