Skip to content

Commit

Permalink
feat: add custom release mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
johanntaeu committed May 24, 2024
1 parent 8d92932 commit bf6a75d
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 4 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/securepoint-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
tags:
- v*

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
id: go

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
project_name: oauth2-proxy
builds:
- env:
- CGO_ENABLED=0
binary: oauth2-proxy
goos:
- linux
- darwin
goarch:
- amd64
- arm64
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func main() {
configFlagSet.Parse(os.Args[1:])

if *showVersion {
fmt.Printf("oauth2-proxy %s (built with %s)\n", VERSION, runtime.Version())
fmt.Printf("oauth2-proxy %s (built with %s)\n", version, runtime.Version())
return
}

Expand Down
2 changes: 1 addition & 1 deletion oauthproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func NewOAuthProxy(opts *options.Options, validator func(string) bool) (*OAuthPr
CustomLogo: opts.Templates.CustomLogo,
ProxyPrefix: opts.ProxyPrefix,
Footer: opts.Templates.Footer,
Version: VERSION,
Version: version,
Debug: opts.Templates.Debug,
ProviderName: buildProviderName(provider, opts.Providers[0].Name),
SignInMessage: buildSignInMessage(opts),
Expand Down
4 changes: 2 additions & 2 deletions version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main

// VERSION contains version information
var VERSION = "undefined"
// version contains version information
var version = "undefined"

0 comments on commit bf6a75d

Please sign in to comment.