Skip to content

[FIX] generate command has a generic processing engine but when gener… #22

[FIX] generate command has a generic processing engine but when gener…

[FIX] generate command has a generic processing engine but when gener… #22

Workflow file for this run

name: NSC client tool release
on:
# We use goreleaser in release mode, so if we do a workflow_dispatch rule here then we should prompt for a tag to check out.
push:
tags:
# From 2.7.6 onwards, we use the vX.Y.Z tag naming pattern.
# Before then, we used non-version tags.
# Going forward, for new releases, we only need to support v.
- 'v[0-9]*'
permissions:
# Control the GITHUB_TOKEN permissions; GitHub's docs on which permission scopes control what are a little lacking.
# By having this block, all permissions not listed here are set to none.
# <https://goreleaser.com/ci/actions/> documents which scopes are needed for it.
#
# Uploading archives as release artifacts is bundled into the contents: permission key.
# The packages: permission is for pushing docker images to github (ghcr.io) instead.
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# If we do docker image builds, multi-arch, then because goreleaser can't do image builds
# in the style of 'crane' or 'ko', and needs a local docker daemon, then at this point
# we'd set up QEMU and Buildx; in other projects, we have success using:
# docker/setup-qemu-action@v1
# docker/setup-buildx-action@v1
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.21'
check-latest: true
- name: Install cosign
uses: sigstore/cosign-installer@main
# This is used inside goreleaser, not as a separate step in this file
- name: Basic integrity checks
# TODO: If we switch from vendor to modules, consider a Retracted check here
run: |
go vet ./...
- name: Run GoReleaser
id: goreleaser
uses: goreleaser/goreleaser-action@v2
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
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
SIGNING_KEY_COSIGN: ${{ secrets.RELEASE_SIGNING_KEY_COSIGN }}
SIGNING_KEY_SSH: ${{ secrets.RELEASE_SIGNING_KEY_SSH }}
COSIGN_PASSWORD: ""
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: homebrew-formula-nsc.rb
path: build/nsc.rb