Skip to content

msg

msg #7

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
release:
name: Release on GitHub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: softprops/action-gh-release@v1
image:
name: Push container image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/metadata-action@v4
id: meta
with:
images: ghcr.io/${{ github.repository_owner }}/conbukun
tags: |
# v1.2.3-rc.4
type=semver,pattern={{raw}}
# 1.2.3-rc.4
type=semver,pattern={{version}}
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
binary:
name: Release binary
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # we need git tags
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}