mirror of
https://github.com/TECHNOFAB11/docsonnet.git
synced 2026-02-02 07:35:11 +01:00
chore/fix: switch release pipeline to goreleaser & ghcr.io (#43)
* chore: add goreleaser config + adapt Dockerfile * chore: cleanup makefile and deprecated pipeline * chore: go mod tidy -go=1.19 * feat: add release pipeline --------- Signed-off-by: Matthias Riegler <me@xvzf.tech>
This commit is contained in:
parent
01f689fb4a
commit
b2e9d3bb12
9 changed files with 106 additions and 120 deletions
52
.github/workflows/go-releaser.yml
vendored
Normal file
52
.github/workflows/go-releaser.yml
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
name: goreleaser
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.19
|
||||
|
||||
# Get values for cache paths to be used in later steps
|
||||
- id: go-cache-paths
|
||||
run: |
|
||||
echo "::set-output name=go-build::$(go env GOCACHE)"
|
||||
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Cache go build cache, used to speedup go test
|
||||
- name: Go Build Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.go-cache-paths.outputs.go-build }}
|
||||
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
|
||||
#
|
||||
# Cache go mod cache, used to speedup builds
|
||||
- name: Go Mod Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.go-cache-paths.outputs.go-mod }}
|
||||
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
|
||||
# Run goreleaser; this one creates the GH release and pushes the images
|
||||
- name: Run GoReleaser
|
||||
id: goreleaser-id
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue