Skip to content

Commit

Permalink
FEATURE: goreleaser pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
skurfuerst committed Nov 23, 2021
1 parent ba36c60 commit 8fc2cfe
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: release

on:
push:
tags:
- 'v*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- run: |
sudo apt-get install -y libpcsclite-dev
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.SANDSTORM_GHBOT_TOKEN }}


53 changes: 53 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
before:
hooks:
- go mod tidy
builds:
-
# env:
# - CGO_ENABLED=0
id: "yubikey-agent"
main: ./main.go
goos:
- darwin
goarch:
- amd64
- arm64
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

brews:
-
name: sandstorm-yubikey-agent

tap:
owner: sandstorm
name: homebrew-tap

# Git author used to commit to the repository.
# Defaults are shown.
commit_author:
name: Sandstorm Release Bot
email: [email protected]

# Folder inside the repository to put the formula.
# Default is the root folder.
folder: Formula

# Your app's homepage.
# Default is empty.
homepage: "https://github.com/sandstorm/yubikey-agent"
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# SANDSTORM FORK of yubikey-agent

This tool is so critical for our Yubikey usage; that's why we decided to fork it to have full control over the build
pipeline etc.

ADJUSTMENTS compared to upstream fork:

- [Re-add "save to keychain" on OSX](https://github.com/FiloSottile/yubikey-agent/pull/108)
- GitHub Actions based release with goreleaser

**Build Pipeline**

> If you need to push the homebrew tap to another repository, you must therefore create a custom Personal Access Token
> with repo permissions and add it as a secret in the repository. If you create a secret named GH_PAT, the step will
> look like this:
- we use the *sandstorm-ghbot* user for this, who has write access to the https://github.com/sandstorm/homebrew-tap repo.
- the token is an organization-level token named SANDSTORM_GHBOT_TOKEN.

Original readme follows below.

---
---
---

# yubikey-agent

yubikey-agent is a seamless ssh-agent for YubiKeys.
Expand Down

0 comments on commit 8fc2cfe

Please sign in to comment.