Skip to content

.github/workflows/release.yml #34

.github/workflows/release.yml

.github/workflows/release.yml #34

Workflow file for this run

on:
release:
types: [created]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-20.04
strategy:
matrix:
goos: [linux]
goarch: [amd64]
steps:
- uses: actions/checkout@v3
- uses: lmangani/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.20.2.linux-amd64.tar.gz"
pre_command: export CGO_ENABLED=1
project_path: "."
binary_name: "quackpipe"
asset_name: quackpipe-${{ matrix.goarch }}
executable_compression: upx
compress_assets: OFF
build_flags: -buildvcs=false
#ldflags: "-linkmode external -extldflags -static"
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}