Merge pull request #179 from cybozu-go/bump-0.13.0 #27
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 images to quay.io | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Log in quay.io | |
run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USER }} --password-stdin quay.io | |
- run: make setup | |
- run: make image | |
- run: make tag push IMAGE_PREFIX=quay.io/cybozu/ IMAGE_TAG=${GITHUB_REF#refs/tags/v} | |
release: | |
name: Release on GitHub | |
needs: image | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
VERSION=${GITHUB_REF#refs/tags/} # Don't remove "v" prefix. | |
if echo ${VERSION} | grep -q -e '-'; then PRERELEASE_FLAG=-p; fi | |
gh release create $VERSION $PRERELEASE_FLAG \ | |
-t "Release $VERSION" \ | |
-n "See [CHANGELOG.md](./CHANGELOG.md) for details." |