Skip to content

Commit

Permalink
test goreleaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
o-fl0w committed Nov 22, 2023
1 parent 2dca7f8 commit e834aaf
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 29 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish_bin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and Publish Binaries

on:
workflow_dispatch:
push:
tags:
- 'v*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
- run: go generate ./cmd/stash-vr/
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Builds
name: Build and Publish Docker Images

on:
workflow_dispatch:
Expand All @@ -10,7 +10,7 @@ on:

jobs:
push_to_registry:
name: Push to Docker Hub
name: Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -49,22 +49,4 @@ jobs:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
- run: go generate ./cmd/stash-vr/
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
labels: ${{ steps.meta.outputs.labels }}
17 changes: 9 additions & 8 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ builds:
- -X stash-vr/internal/build.Version={{.Version}} -X stash-vr/internal/build.SHA={{.Commit}}
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
targets:
- linux_amd64
- linux_arm64
- windows_amd64
- darwin_amd64
- darwin_arm64
archives:
- format: tar.gz
format_overrides:
- goos: windows
format: zip
format: zip
release:
mode: append

0 comments on commit e834aaf

Please sign in to comment.