Skip to content

Merge pull request #37 from cybozu-go/perf-6.14 #15

Merge pull request #37 from cybozu-go/perf-6.14

Merge pull request #37 from cybozu-go/perf-6.14 #15

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
image:
name: Push Container Image
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: "go.mod"
- uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
with:
platforms: linux/amd64
- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Login to GitHub Container Registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build necoperf-cli and necoperf-daemon image
run: make docker-build
- name: Push necoperf-cli and necoperf-daemon image
run: |
IMAGE_TAG=${GITHUB_REF#refs/tags/v} # Remove "v" prefix.
docker tag necoperf-cli:dev ghcr.io/cybozu-go/necoperf-cli:$IMAGE_TAG
docker push ghcr.io/cybozu-go/necoperf-cli:$IMAGE_TAG
docker tag necoperf-daemon:dev ghcr.io/cybozu-go/necoperf-daemon:$IMAGE_TAG
docker push ghcr.io/cybozu-go/necoperf-daemon:$IMAGE_TAG
release:
name: Release on GitHub
needs: image
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: "go.mod"
- name: GoReleaser
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
with:
distribution: goreleaser
version: v2.12.7
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}