From 278bed84ccdf53a72360edb02479b6ebca6d314c Mon Sep 17 00:00:00 2001 From: David Birks Date: Mon, 6 Mar 2023 21:06:33 -0500 Subject: [PATCH] First pass at adding goreleaser and Github Actions --- .github/workflows/release.yaml | 28 ++++++++++++++++++++++++++++ .gitignore | 3 ++- .goreleaser.yaml | 24 ++++++++++++++++++++++++ README.md | 9 ++++++++- 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yaml create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..ec7ed9e --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,28 @@ +name: Release + +on: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: git fetch --force --tags + - uses: actions/setup-go@v3 + with: + go-version: ">=1.20.1" + cache: true + - uses: goreleaser/goreleaser-action@v4 + with: + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index c5ab303..a264261 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -get-jwt \ No newline at end of file +get-jwt +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..0631662 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,24 @@ +builds: + - goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm64 + +archives: + - format: tar.gz + files: + - none* + +changelog: + sort: asc + +brews: + - tap: + owner: dbirks + name: get-jwt + description: A helper utility to make it easier to get a JWT + homepage: https://github.com/dbirks/get-jwt + license: Apache2 diff --git a/README.md b/README.md index a0ba60b..09b639b 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,16 @@ If this is the first time that get-jwt is being run against an App Registration ### Homebrew +If you have Homebrew installed for MacOS or Linux, you can install from the tap with: + +``` +brew tap dbirks/get-jwt https://github.com/dbirks/get-jwt +brew install get-jwt +``` + ### Binary -Pre-built binaries are available for MacOS, Windows, and Linux in the [Github Releases](https://github.com/dbirks/get-jwt/releases). +Pre-built binaries are available for Windows, MacOS, and Linux in the [Github Releases](https://github.com/dbirks/get-jwt/releases). ### Go