Skip to content

Release

Release #7

name: Release & Publish
on:
push:
tags: ["v*.*.**"]
workflow_dispatch:
inputs:
tag:
description: "Target tag to release & publish"
required: true
type: string
jobs:
release:
name: goreleaser-cross
runs-on: ubuntu-latest
container:
image: ghcr.io/goreleaser/goreleaser-cross:latest
steps:
- uses: actions/checkout@master
with:
ref: "${{ inputs.tag }}"
fetch-depth: 0
- run: goreleaser release
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
publish:
name: publish images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: "${{ inputs.tag }}"
- uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/[email protected]
with:
push: true
build-args: "VERSION=${{ inputs.tag }}"
tags: "ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ inputs.tag }}"