This repository has been archived by the owner on Oct 10, 2024. It is now read-only.
Merge pull request #26 from cybozu-go/bump-v0.1.6 #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
image: | |
name: Push Container Image | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build images | |
run: | | |
docker build -t cat-gate:dev . | |
- name: Login to ghcr.io | |
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin | |
- name: Push images | |
run: | | |
TAG=${GITHUB_REF#refs/tags/v} | |
docker tag cat-gate:dev ghcr.io/cybozu-go/cat-gate:${TAG} | |
docker push ghcr.io/cybozu-go/cat-gate:${TAG} | |
release: | |
name: Release on GitHub | |
needs: image | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: GoReleaser | |
uses: 'goreleaser/goreleaser-action@v5' | |
with: | |
distribution: goreleaser | |
version: v1.26.2 | |
args: release --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |